public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: william.lyu@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] perl: Fix perl-module-* being ignored via COMPLEMENTARY_GLOB
Date: Mon, 22 Jan 2024 19:03:51 +0000	[thread overview]
Message-ID: <8157e567182f3b802404f1a3d95f82fd21f8c0ce.camel@linuxfoundation.org> (raw)
In-Reply-To: <20240122154919.42591-1-William.Lyu@windriver.com>

On Mon, 2024-01-22 at 07:49 -0800, Lyu, William via
lists.openembedded.org wrote:
> From: William Lyu <William.Lyu@windriver.com>
> 
> When perl-modules is added via COMPLEMENTARY_GLOB, all perl-module-*
> packages recommended by perl-modules are ignored due to the defined
> behavior of COMPLEMENTARY_GLOB.
> 
> This patch changes the relationship between perl-modules and all of its
> perl-module-* from RRECOMMENDS to RDEPENDS. This makes sense as
> perl-modules should represent the collection of all optional
> perl-module-* packages. After this patch, perl-modules itself is being
> RRECOMMENDED instead of the individual perl-module-* packages
> perl-modules represents.
> 
> Signed-off-by: William Lyu <William.Lyu@windriver.com>
> ---
>  meta/recipes-devtools/perl/perl_5.38.2.bb | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/meta/recipes-devtools/perl/perl_5.38.2.bb b/meta/recipes-devtools/perl/perl_5.38.2.bb
> index a9d684cfc5..5037816f89 100644
> --- a/meta/recipes-devtools/perl/perl_5.38.2.bb
> +++ b/meta/recipes-devtools/perl/perl_5.38.2.bb
> @@ -306,8 +306,8 @@ ALTERNATIVE_PRIORITY = "40"
>  ALTERNATIVE:${PN}-doc = "Thread.3"
>  ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
>  
> -# Create a perl-modules package recommending all the other perl
> -# packages (actually the non modules packages and not created too)
> +# Create a perl-modules package that represents the collection of all the
> +# other perl packages (actually the non modules packages and not created too).
>  ALLOW_EMPTY:${PN}-modules = "1"
>  PACKAGES += "${PN}-modules "
>  
> @@ -322,11 +322,16 @@ python split_perl_packages () {
>      do_split_packages(d, libdir, r'.*linux/([^\/].*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
>      do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|.*linux\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
>  
> -    # perl-modules should recommend every perl module, and only the
> +    # perl-modules should runtime-depend on every perl module, and only the
>      # modules. Don't attempt to use the result of do_split_packages() as some
>      # modules are manually split (eg. perl-module-unicore).
>      packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split())
> -    d.setVar(d.expand("RRECOMMENDS:${PN}-modules"), ' '.join(packages))
> +    d.setVar(d.expand("RDEPENDS:${PN}-modules"), ' '.join(packages))
> +
> +    # As perl-modules depends on all other, potentially non-existent, perl
> +    # packages, we allow these packages to be empty to prevent build errors.
> +    for pkg in d.getVar(d.expand("RDEPENDS:${PN}-modules")).split():
> +        d.setVar(d.expand("ALLOW_EMPTY:" + pkg), "1")
>  
>      # Read the pre-generated dependency file, and use it to set module dependecies
>      for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():

Do you have some examples of these packages which don't exist?

I'd like to understand why they don't exist and perhaps not have them
listed in PACKAGES in the first place. Creating a load of empty/useless
packages with ALLOW_EMPTY seems a bit pointless/sad.

Cheers,

Richard





  reply	other threads:[~2024-01-22 19:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 15:49 [PATCH] perl: Fix perl-module-* being ignored via COMPLEMENTARY_GLOB William.Lyu
2024-01-22 19:03 ` Richard Purdie [this message]
2024-01-22 23:51   ` [OE-core] " Lyu, William
2024-01-23  9:35     ` Alexander Kanavin
2024-01-23 10:27       ` Richard Purdie
  -- strict thread matches above, loose matches on Subject: below --
2024-01-24  3:22 William.Lyu
2024-01-24  9:44 ` [OE-core] " Alexander Kanavin
2024-01-24 16:26   ` Lyu, William

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=8157e567182f3b802404f1a3d95f82fd21f8c0ce.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=william.lyu@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox