From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Jate Sujjavanich <jatedev@gmail.com>
Cc: bitbake-devel@lists.openembedded.org,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2][2/2] image.bbclass/rootfs.py: use PREFERRED_RPROVIDER to select package
Date: Thu, 14 May 2015 10:46:49 +0100 [thread overview]
Message-ID: <1431596809.30971.197.camel@linuxfoundation.org> (raw)
In-Reply-To: <CAPphmgY46h8ajbqL66rynRf2-u28a0duxPFV3MqPjb_iB_RvaA@mail.gmail.com>
On Wed, 2015-05-13 at 18:47 -0400, Jate Sujjavanich wrote:
> +python rootfs_process_preferred_rproviders() {
> + inst_pkgs = d.getVar("PACKAGE_INSTALL", True).split()
> + pref_pkgs = list()
> + for pkg in inst_pkgs:
> + prefervar = d.getVar("PREFERRED_RPROVIDER_%s" % pkg, True)
> + if prefervar:
> + inst_pkgs.remove(pkg)
> + pref_pkgs.append(prefervar)
> + bb.note("Selecting %s to provide %s due to
> PREFERRED_RPROVIDER" % (prefervar, pkg))
> + inst_pkgs.extend(pref_pkgs)
> + d.setVar("PACKAGE_INSTALL", ' '.join(inst_pkgs))
> +}
> +do_rootfs[prefuncs] += "rootfs_process_preferred_rproviders"
> +
> # We have to delay the runtime_mapping_rename until just before
> rootfs runs
> # otherwise, the multilib renaming could step in and squash any
> fixups that
> # may have occurred.
This kind of approach to the problem basically doesn't scale. Yes, it
will rewrite things in PACKAGE_INSTALL however if package A depends on
package B using one of these names, the mechanism will simply not work.
This will in turn generate a whole new world of bug reports with no way
to really fix the problems.
This is why we have other mechanisms for handling the runtime provider
names, usually through parametrisation with variables so that when you
rewrite an entry, *all* entries get rewritten and what the package
manager sees is consistent.
I would also note that in the past, bitbake once did have
PREFERRED_RPROVIDER support. We dropped it as it caused problems. I
suspect I would have written up some rationale for that when we did it
which would be in the list archives.
Cheers,
Richard
next prev parent reply other threads:[~2015-05-14 9:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 22:47 [PATCH v2][2/2] image.bbclass/rootfs.py: use PREFERRED_RPROVIDER to select package Jate Sujjavanich
2015-05-14 9:46 ` Richard Purdie [this message]
2015-05-27 23:32 ` Jate Sujjavanich
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=1431596809.30971.197.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=jatedev@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/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.