diff mbox series

python3: package tkinter's shared objects

Message ID 20241126015518.2463257-1-danismostlikely@gmail.com
State New
Headers show
Series python3: package tkinter's shared objects | expand

Commit Message

Dan McGregor Nov. 26, 2024, 1:55 a.m. UTC
From: Dan McGregor <dan.mcgregor@usask.ca>

Seems every time python is updated this gets removed. That's likely
because the tk option can't be enabled in python3-native without
creating a dependency loop.

For now, re-add the tkinter packaging info to the manifest.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
---
 meta/recipes-devtools/python/python3/python3-manifest.json | 1 +
 1 file changed, 1 insertion(+)

Comments

Alexander Kanavin Nov. 26, 2024, 11:11 a.m. UTC | #1
This is not correct and will be undone by the next manifest update
again because that works from a default set of options. You need to
add this to the python recipe.

Alex

On Tue, 26 Nov 2024 at 02:55, Dan McGregor via lists.openembedded.org
<danismostlikely=gmail.com@lists.openembedded.org> wrote:
>
> From: Dan McGregor <dan.mcgregor@usask.ca>
>
> Seems every time python is updated this gets removed. That's likely
> because the tk option can't be enabled in python3-native without
> creating a dependency loop.
>
> For now, re-add the tkinter packaging info to the manifest.
>
> Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
> ---
>  meta/recipes-devtools/python/python3/python3-manifest.json | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json
> index 4b7f9cc7e33..3ed99b9012d 100644
> --- a/meta/recipes-devtools/python/python3/python3-manifest.json
> +++ b/meta/recipes-devtools/python/python3/python3-manifest.json
> @@ -1092,6 +1092,7 @@
>              "core"
>          ],
>          "files": [
> +            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so",
>              "${libdir}/python${PYTHON_MAJMIN}/tkinter"
>          ],
>          "cached": []
> --
> 2.47.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#207824): https://lists.openembedded.org/g/openembedded-core/message/207824
> Mute This Topic: https://lists.openembedded.org/mt/109783729/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Dan McGregor Nov. 26, 2024, 4:24 p.m. UTC | #2
Oh neat, that worked, thanks. There'll be a v2 to this patch. I copied
previous patches that fixed this issue by patching the manifest, like
this one:
https://git.openembedded.org/openembedded-core/commit/?id=163966765d57fe38e13d0b6659795a13bc702e2d

Updating the recipe itself is kind of gross considering the overall
plan for the manifest.json method, but this will prevent it getting
reverted every time Python gets updated.

On Tue, 26 Nov 2024 at 05:11, Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> This is not correct and will be undone by the next manifest update
> again because that works from a default set of options. You need to
> add this to the python recipe.
>
> Alex
>
> On Tue, 26 Nov 2024 at 02:55, Dan McGregor via lists.openembedded.org
> <danismostlikely=gmail.com@lists.openembedded.org> wrote:
> >
> > From: Dan McGregor <dan.mcgregor@usask.ca>
> >
> > Seems every time python is updated this gets removed. That's likely
> > because the tk option can't be enabled in python3-native without
> > creating a dependency loop.
> >
> > For now, re-add the tkinter packaging info to the manifest.
> >
> > Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
> > ---
> >  meta/recipes-devtools/python/python3/python3-manifest.json | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json
> > index 4b7f9cc7e33..3ed99b9012d 100644
> > --- a/meta/recipes-devtools/python/python3/python3-manifest.json
> > +++ b/meta/recipes-devtools/python/python3/python3-manifest.json
> > @@ -1092,6 +1092,7 @@
> >              "core"
> >          ],
> >          "files": [
> > +            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so",
> >              "${libdir}/python${PYTHON_MAJMIN}/tkinter"
> >          ],
> >          "cached": []
> > --
> > 2.47.0
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#207824): https://lists.openembedded.org/g/openembedded-core/message/207824
> > Mute This Topic: https://lists.openembedded.org/mt/109783729/1686489
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Dan McGregor Nov. 26, 2024, 4:45 p.m. UTC | #3
Nevermind, this didn't work, my initial optimistic test was wrong, I
had disabled the tk packageconfig again before I ran this :(
The original patch so far is the only one that I have that's working.

On Tue, 26 Nov 2024 at 10:31, Dan McGregor via lists.openembedded.org
<danismostlikely=gmail.com@lists.openembedded.org> wrote:
>
> From: Dan McGregor <dan.mcgregor@usask.ca>
>
> Seems every time python is updated this gets removed. That's likely
> because the tk option can't be enabled in python3-native without
> creating a dependency loop.
>
> Instead of manually editing the manifest every time, explicitly
> add it in the recipe as suggested by Alexander Kanavin.
>
> Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
> ---
>  meta/recipes-devtools/python/python3_3.13.0.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-devtools/python/python3_3.13.0.bb b/meta/recipes-devtools/python/python3_3.13.0.bb
> index 8db5b813738..497b5fc1744 100644
> --- a/meta/recipes-devtools/python/python3_3.13.0.bb
> +++ b/meta/recipes-devtools/python/python3_3.13.0.bb
> @@ -428,6 +428,7 @@ RPROVIDES:${PN}-modules = "${PN}"
>
>  FILES:${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
>  FILES:${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
> +FILES:${PN}-tkinter += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so"
>
>  # provide python-pyvenv from python3-venv
>  RPROVIDES:${PN}-venv += "${MLPREFIX}python3-pyvenv"
> --
> 2.47.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#207865): https://lists.openembedded.org/g/openembedded-core/message/207865
> Mute This Topic: https://lists.openembedded.org/mt/109792213/3617261
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [danismostlikely@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alexander Kanavin Nov. 26, 2024, 4:48 p.m. UTC | #4
You need to find out why is that. FILES setting in a recipe should not
be replaced by what's in the manifest but only added to it.

Alex
On Tue, 26 Nov 2024 at 17:45, Dan McGregor via lists.openembedded.org
<danismostlikely=gmail.com@lists.openembedded.org> wrote:
>
> Nevermind, this didn't work, my initial optimistic test was wrong, I
> had disabled the tk packageconfig again before I ran this :(
> The original patch so far is the only one that I have that's working.
Dan McGregor Nov. 26, 2024, 5:05 p.m. UTC | #5
On Tue, 26 Nov 2024 at 10:48, Alexander Kanavin via
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
wrote:
>
> You need to find out why is that. FILES setting in a recipe should not
> be replaced by what's in the manifest but only added to it.

Okay, that's actually obvious. It's resetting the FILES:${PN}...
variables explicitly in the manifest parsing. Didn't know the history
of that, so didn't want to touch it. If the intent is to append to
what's in the recipe then that's an easy change.

>
> Alex
> On Tue, 26 Nov 2024 at 17:45, Dan McGregor via lists.openembedded.org
> <danismostlikely=gmail.com@lists.openembedded.org> wrote:
> >
> > Nevermind, this didn't work, my initial optimistic test was wrong, I
> > had disabled the tk packageconfig again before I ran this :(
> > The original patch so far is the only one that I have that's working.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#207868): https://lists.openembedded.org/g/openembedded-core/message/207868
> Mute This Topic: https://lists.openembedded.org/mt/109792534/3617261
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [danismostlikely@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alexander Kanavin Nov. 26, 2024, 5:11 p.m. UTC | #6
On Tue, 26 Nov 2024 at 18:06, Dan McGregor <danismostlikely@gmail.com> wrote:
> > You need to find out why is that. FILES setting in a recipe should not
> > be replaced by what's in the manifest but only added to it.
>
> Okay, that's actually obvious. It's resetting the FILES:${PN}...
> variables explicitly in the manifest parsing. Didn't know the history
> of that, so didn't want to touch it. If the intent is to append to
> what's in the recipe then that's an easy change.

Can you try that and use buildhistory to see how the packaging changes?

Alex
Dan McGregor Nov. 26, 2024, 5:48 p.m. UTC | #7
On Tue, 26 Nov 2024 at 11:11, Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> On Tue, 26 Nov 2024 at 18:06, Dan McGregor <danismostlikely@gmail.com> wrote:
> > > You need to find out why is that. FILES setting in a recipe should not
> > > be replaced by what's in the manifest but only added to it.
> >
> > Okay, that's actually obvious. It's resetting the FILES:${PN}...
> > variables explicitly in the manifest parsing. Didn't know the history
> > of that, so didn't want to touch it. If the intent is to append to
> > what's in the recipe then that's an easy change.
>
> Can you try that and use buildhistory to see how the packaging changes?

Yup, just did that. The packaging didn't change much. The only changes
were to the FILES values for python3-dev and python3-idle, in both
cases just restoring default value before the value added by the
manifest. The files lists for all packages remained the same, except
tkinter which added the shared object correctly. v3 incoming...

>
> Alex
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json
index 4b7f9cc7e33..3ed99b9012d 100644
--- a/meta/recipes-devtools/python/python3/python3-manifest.json
+++ b/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -1092,6 +1092,7 @@ 
             "core"
         ],
         "files": [
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/tkinter"
         ],
         "cached": []