public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Quentin Schulz <quentin.schulz@cherry.de>,
	 openembedded-core@lists.openembedded.org
Cc: docs <docs@lists.yoctoproject.org>
Subject: Re: [OE-core] [PATCH 4/4] native: Improve ${PN}-XXX package name handling
Date: Mon, 13 Jan 2025 14:05:54 +0000	[thread overview]
Message-ID: <5e0b242f7567c19dfe2bc3f1eea4e2e0744e1e47.camel@linuxfoundation.org> (raw)
In-Reply-To: <83b689cd-fca0-4ced-a644-68c9437de9ba@cherry.de>

On Mon, 2025-01-13 at 14:45 +0100, Quentin Schulz wrote:
> Cc docs
> 
> On 1/6/25 5:09 PM, Richard Purdie via lists.openembedded.org wrote:
> > If a recipe has something like:
> > 
> > RPROVIDES:${PN}-xxx = "yyy"
> > 
> > then the current code will turn this into:
> > 
> > RPROVIDES:${BPN}-native-xxx = "yyy-native"
> > 
> > which can lead to errors. Add in some handling for this special case in the class
> > extension code.
> > 
> > The corresponding entry in PACAGES is correctly remapped, the variables aren't
> > remapped to match though.
> > 
> > Note that merging this does trigger new dependencies to be exposed, some of which
> > can't be met or are incorrect. These need to be fixed on a case by case basis.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> >   meta/classes-recipe/native.bbclass | 7 ++++++-
> >   1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass
> > index d9651a7f22d..0fad42a5a45 100644
> > --- a/meta/classes-recipe/native.bbclass
> > +++ b/meta/classes-recipe/native.bbclass
> > @@ -158,7 +158,12 @@ python native_virtclass_handler () {
> >                   newdeps.append(dep.replace(pn, bpn) + "-native")
> >               else:
> >                   newdeps.append(dep)
> > -        d.setVar(varname, " ".join(newdeps))
> > +        output_varname = varname
> > +        # Handle ${PN}-xxx -> ${BPN}-xxx-native
> > +        if suffix != "${PN}" and "${PN}" in suffix:
> > +            output_varname = varname.replace("${PN}", "${BPN}") + "-native"
> > +            d.renameVar(varname, output_varname)
> > +        d.setVar(output_varname, " ".join(newdeps))
> >   
> 
> This seems like a bug we should document in known issues in old release 
> notes?
> 
> I assume we may patch currently supported releases so stable dot 
> releases may receive the patch, but outdated releases would be unpatched 
> forever.

The change in behaviour is enough that I don't think we should be
backporting this to stable releases. The issue is rare and seemingly
not being run into by many people in the wild.

> I guess we can say that the fix is to have each of RDEPENDS, 
> RRECOMMENDS, RSUGGESTS, RPROVIDES, RREPLACES, PACKAGES overrides and 
> PACKAGES_DYNAMIC to have ${BPN}-xxx+${BPN}-xxx-native instead of just
> ${PN}-xxx? Is that an appropriate suggestion?

We'd probably suggest that users "spell out" the native mappings
explicitly for any problems encountered. I'd argue they should be
mapped correctly rather than introducing the "bad" naming.

> I'm bringing this up because we have a Known issues section in the 
> migration guides which is pretty much empty right now. I don't know what 
> we should actually put in there but this seems like a candidate? What do 
> you think? Antonin?

That is something we should consider, yes.

Cheers,

Richard




      reply	other threads:[~2025-01-13 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250106160948.803305-1-richard.purdie@linuxfoundation.org>
     [not found] ` <20250106160948.803305-4-richard.purdie@linuxfoundation.org>
2025-01-13 13:45   ` [OE-core] [PATCH 4/4] native: Improve ${PN}-XXX package name handling Quentin Schulz
2025-01-13 14:05     ` Richard Purdie [this message]

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=5e0b242f7567c19dfe2bc3f1eea4e2e0744e1e47.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=docs@lists.yoctoproject.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=quentin.schulz@cherry.de \
    /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