All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Hernandez <alejandro.enedino.hernandez-samaniego@xilinx.com>
To: "Yu, Mingli" <mingli.yu@windriver.com>,
	Alejandro Hernandez
	<alejandro.enedino.hernandez-samaniego@xilinx.com>,
	"Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/7] python3: add tk support
Date: Tue, 13 Nov 2018 00:25:23 -0800	[thread overview]
Message-ID: <8a3f9482-3402-886f-3fa3-dee69114d878@xilinx.com> (raw)
In-Reply-To: <5BEA3F06.3060705@windriver.com>

On 11/12/2018 7:03 PM, Yu, Mingli wrote:
> Hi Alejandro,
>
> Many thanks for your comments, please check my comments inline.
>
> On 2018年11月12日 23:28, Alejandro Hernandez wrote:
>> Hey Yu,
>>
>>
>> On 11/11/2018 6:28 PM, Yu, Mingli wrote:
>>>
>>>
>>> On 2018年11月09日 21:02, Burton, Ross wrote:
>>>> On Fri, 9 Nov 2018 at 01:39, Yu, Mingli <mingli.yu@windriver.com> 
>>>> wrote:
>>>>>> Why is this here and not in the manifest?
>>>>>
>>>>> It's because we can optionally enable or disable tk via 
>>>>> PACKAGECONFIG,
>>>>> if add it to manifest then we need to always enable tk which is also
>>>>> the
>>>>> implement in v1.
>>>>
>>>> Are you sure?  As I understand it there won't be any errors if the
>>>> contents don't exist.  And to be honest if there are, then the
>>>> manifest tooling should handle that neatly without special-casing.
>>>
>>> Hi Ross,
>>>
>>> Thanks for your feedback!
>>>
>>> I didn't quite understand what you mean. As I know, if we add the the
>>> setting in manifest as below:
>>> diff --git
>>> a/meta/recipes-devtools/python/python3/python3-manifest.json
>>> b/meta/recipes-devtools/python/python3/python3-manifest.json
>>> index f922561..09c9199 100644
>>> --- a/meta/recipes-devtools/python/python3/python3-manifest.json
>>> +++ b/meta/recipes-devtools/python/python3/python3-manifest.json
>>> @@ -1056,10 +1056,12 @@
>>>      "tkinter": {
>>>          "summary": "Python Tcl/Tk bindings",
>>>          "rdepends": [
>>> -            "core"
>>> +            "core",
>>> +            "tk"
>>
>>
>> This error is happening because you are trying to add python3-tk on
>> RDEPENDS, and that package doesn't exist, when you specify "foo" on the
>> "rdepends" section of the manifest it is translated to ${PN}-foo.
>
> Yes, that's why I point out that we need to add extra logic in python3 
> recipe to make it rdepends on tk after add the logic as below:
>
> diff --git 
> a/meta/recipes-devtools/python/python3/python3-manifest.json 
> b/meta/recipes-devtools/python/python3/python3-manifest.json
> index f922561..09c9199 100644
> --- a/meta/recipes-devtools/python/python3/python3-manifest.json
> +++ b/meta/recipes-devtools/python/python3/python3-manifest.json
> @@ -1056,10 +1056,12 @@
>      "tkinter": {
>          "summary": "Python Tcl/Tk bindings",
>          "rdepends": [
> -            "core"
> +            "core",
> +            "tk"
>          ],
>          "files": [
> -            "${libdir}/python${PYTHON_MAJMIN}/tkinter"
> +            "${libdir}/python${PYTHON_MAJMIN}/tkinter",
> + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter*.so"
>          ],
>          "cached": []
>      },
>
>>
>> So two things:
>>
>> 1. The manifest can have the _tkinter.*.so on the "files section of
>> tkinter (please note that this is _tkinter.*.so and not _tkinter*.so,
>> the wildcard should be after a "." this is to keep a standard which the
>> tooling can handle more easily.
>
> Got it, thanks!
>
>>
>> When the PACKAGECONFIG is enabled, the files for tkinter will be picked
>> up correctly.
>>
>> 2. You should not manually add "rdepends" to the manifest, the tool
>> itself should populate those automatically, this is better because we
>> would avoid this kind of errors.
>>
>> Please add the package to the manifest, populate the "files" and
>> "summary" section and then run $ bitbake python3 -c create_manifest to
>> populate the rdepends section automatically, also keep in mind that you
>> should run this when the PACKAGECONFIG is enabled for the native package
>> as well (thats how it will pick up the dependencies).
>
> No new package needed to add to manifest, we only need to update the 
> items for the existed package tkinter and per your suggestion not 
> manually add "rdepends" to the manifest, so I only add files to 
> manifest as below in manifest file,


My mistake  I thought you were adding a new package.

Anyway, as a matter of fact, all you need to do is to add the same 
PACKAGECONFIG on the python3 native recipe and enable it, once its 
enabled you can run the create_manifest task and it should automatically 
generate you a new manifest with the required files (clarifying that it 
doesnt have to be enabled by default but it has to be enabled on the 
native package when the create_manifest task is run), meaning that you 
don't actually need to add the _tkinter.*.so file manually to the 
manifest, it should be picked up automatically, this is because the 
create_manifest tool assumes that the python3 and python3-native 
packages are exact copies of each other.

Regarding the extra logic, I also agree with Ross, and I don't 
personally like having the extra logic there, either for that package or 
for handling each package that would need a PACKAGECONFIG, I think using

RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 
'tk', '', d)}"

should be enough.


Alejandro


>
> diff --git 
> a/meta/recipes-devtools/python/python3/python3-manifest.json 
> b/meta/recipes-devtools/python/python3/python3-manifest.json
> index f922561..09c9199 100644
> --- a/meta/recipes-devtools/python/python3/python3-manifest.json
> +++ b/meta/recipes-devtools/python/python3/python3-manifest.json
> @@ -1056,10 +1056,12 @@
> "tkinter": {
> "summary": "Python Tcl/Tk bindings",
> "rdepends": [
>     "core"
> ],
> "files": [
> - "${libdir}/python${PYTHON_MAJMIN}/tkinter"
> + "${libdir}/python${PYTHON_MAJMIN}/tkinter",
> + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter*.so"
> ],
> "cached": []
> },
>
> And also the update the python3 recipe,
>
> diff --git a/meta/recipes-devtools/python/python3_3.5.6.bb 
> b/meta/recipes-devtools/python/python3_3.5.6.bb
> index 2a45476..e50e7dc 100644
> --- a/meta/recipes-devtools/python/python3_3.5.6.bb
> +++ b/meta/recipes-devtools/python/python3_3.5.6.bb
> @@ -78,10 +78,11 @@ export CCSHARED = "-fPIC"
>  # Fix cross compilation of different modules
>  export CROSSPYTHONPATH = 
> "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
>
> -PACKAGECONFIG ??= "readline ${@bb.utils.contains('MACHINE_FEATURES', 
> 'qemu-usermode', 'pgo', '', d)}"
> +PACKAGECONFIG ??= "readline ${@bb.utils.contains('MACHINE_FEATURES', 
> 'qemu-usermode', 'pgo', '', d)} tk"
>  PACKAGECONFIG[readline] = ",,readline"
>  # Use profile guided optimisation by running PyBench inside qemu-user
>  PACKAGECONFIG[pgo] = "--enable-optimizations"
> +PACKAGECONFIG[tk] = ",,tk,tk"
>
> And then I run $ bitbake python3 -c create_manifest, but there is no 
> change in manifest file.
>
> Thanks,
>
>>
>>
>> Cheers,
>>
>> Alejandro
>>
>>
>>> ],
>>>          "files": [
>>> -            "${libdir}/python${PYTHON_MAJMIN}/tkinter"
>>> +            "${libdir}/python${PYTHON_MAJMIN}/tkinter",
>>> + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter*.so"
>>>          ],
>>>          "cached": []
>>>      },
>>>
>>> There comes below error:
>>> ERROR: Nothing RPROVIDES 'python3-tk' (but
>>> /mybuild/layers/oe-core/meta/recipes-devtools/python/python3_3.5.6.bb
>>> RDEPENDS on or otherwise requires it)
>>> NOTE: Runtime target 'python3-tk' is unbuildable, removing...
>>> Missing or unbuildable dependency chain was: ['python3-tk']
>>> ERROR: Required build target 'python3' has no buildable providers.
>>> Missing or unbuildable dependency chain was: ['python3', 'python3-tk']
>>>
>>> That's to say, we still need to add some fix in
>>> meta/recipes-devtools/python/python3_3.5.6.bb. If so, it may be
>>> flexible and clear to directly to make the implement just as what I
>>> send in the RR.
>>>
>>> Thanks,
>>>
>>>>
>>>> Ross
>>>>
>>


  reply	other threads:[~2018-11-13  8:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08  6:08 [PATCH v2 0/7] python/python3: add tk support mingli.yu
2018-11-08  6:08 ` [PATCH v2 1/7] python: " mingli.yu
2018-11-14  9:38   ` [PATCH v3] " mingli.yu
2018-11-19  1:31     ` Yu, Mingli
2018-11-23  1:30     ` Yu, Mingli
2018-11-08  6:08 ` [PATCH 2/7] python3: " mingli.yu
2018-11-08 13:49   ` Burton, Ross
2018-11-09  1:38     ` Yu, Mingli
2018-11-09 13:02       ` Burton, Ross
2018-11-12  2:28         ` Yu, Mingli
2018-11-12 15:28           ` Alejandro Hernandez
2018-11-13  3:03             ` Yu, Mingli
2018-11-13  8:25               ` Alejandro Hernandez [this message]
2018-11-13  9:10                 ` Yu, Mingli
2018-11-13 21:26                   ` Alejandro Hernandez
2018-11-14  8:23                     ` Yu, Mingli
2018-11-14  9:36   ` [PATCH v2] " mingli.yu
2018-11-19  1:32     ` Yu, Mingli
2018-11-23  1:29     ` Yu, Mingli
2018-11-23 11:03       ` richard.purdie
2018-11-23 11:14         ` Richard Purdie
2018-11-08  6:08 ` [PATCH 3/7] libxt: extend to nativesdk mingli.yu
2018-11-08  6:08 ` [PATCH 4/7] libxft: " mingli.yu
2018-11-08  6:08 ` [PATCH 5/7] fontconfig: " mingli.yu
2018-11-08  6:08 ` [PATCH 6/7] libsm: " mingli.yu
2018-11-08  6:08 ` [PATCH 7/7] libice: " mingli.yu
2018-11-08  6:12 ` [PATCH v2 0/7] python/python3: add tk support mingli.yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a3f9482-3402-886f-3fa3-dee69114d878@xilinx.com \
    --to=alejandro.enedino.hernandez-samaniego@xilinx.com \
    --cc=mingli.yu@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.