Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Laurentiu Palcu <laurentiu.palcu@intel.com>
To: Phil Blundell <pb@pbcl.net>
Cc: paul.eggleton@linux.intel.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] image.bbclass: leave metadata in place if a PM is installed in the image
Date: Thu, 5 Sep 2013 14:11:57 +0300	[thread overview]
Message-ID: <20130905111155.GB17481@lpalcu-linux> (raw)
In-Reply-To: <1378377834.6940.66.camel@phil-desktop.brightsign>

On Thu, Sep 05, 2013 at 11:43:54AM +0100, Phil Blundell wrote:
> On Thu, 2013-09-05 at 10:15 +0200, Martin Jansa wrote:
> > On Thu, Sep 05, 2013 at 10:31:10AM +0300, Laurentiu Palcu wrote:
> > >  rootfs_uninstall_unneeded () {
> > > -	if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
> > > +	rpm_installed=${@base_contains("PACKAGE_INSTALL", "rpm",  "true", "false", d)}
> > > +	opkg_installed=${@base_contains("PACKAGE_INSTALL", "opkg", "true", "false", d)}
> > > +	dpkg_installed=${@base_contains("PACKAGE_INSTALL", "dpkg", "true", "false", d)}
> > > +
> > > +	if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)} &&\
> > 
> > is this first condition still needed? Do we have some case where
> > package-management is enabled without rpm/opkg/dpkg installed?
> 
> Yes, potentially.  It is quite legitimate to have package-management in
> IMAGE_FEATURES (in order to have the metadata kept around for later
> inspection) but not actually install any of the package managers.  In
> fact, this is basically all that the package-management feature does,
> and revoking support for it in favour of needing to specify something in
> PACKAGE_INSTALL seems like it would be a retrograde step. 
This patch does not revoke support for 'package-management' in
IMAGE_FEATURES. It just makes sure not to remove anything if a PM is
present in the image. Those packages will be, potentially, needed by
postinstalls etc.
> 
> Replacing the generic IMAGE_FEATURES test with something based on the
> presence of one of three specific package managers also has a few other
> minor downsides:
> 
> - it makes it harder for someone to maintain support for a different
> package manager outside of oe-core;
I agree here.

> 
> - it means that mentioning rpm in PACKAGE_INSTALL for an opkg-based
> image will still cause all the opkg metadata to be retained, which might
> be surprising to some;
Also true, but we cannot really deal with all combinations... can we?

> 
> - it makes it impossible to install opkg or suchlike without its
> metadata, which has occasionally been a useful thing to do.
Is this a valid use case? Besides, right now, if you don't have
'package-management' in IMAGE_FEATURES but have opkg installed you will,
indeed, have opkg installed without metadata but also update-rc.d,
base-passwd and run-postinsts will be removed from the image. This means
that opkg will be slightly useless since postinstalls might need
update-rc.d to complete. Or, if there are delayed postinstalls,
run-postinsts package has to be present too, in order to have those run
at first boot.

> 
> I don't think any of the above are necessarily deal-breakers, but it
> does seem to me that this patch is based on an erroneous premise.  If
> the user wants package management then they should simply be adding that
> flag to IMAGE_FEATURES.  I don't think it's necessary or desirable that
> image.bbclass try to second-guess this by looking at the list of
> packages to be installed and applying some heuristic.
This solution is the most decent I could find in order to address this:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=4484
in this stage of 1.5 release. Other ideas are always welcome.

Thanks,
Laurentiu

> 
> p.
> 
> 


  reply	other threads:[~2013-09-05 11:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05  7:31 [PATCH 0/1] image.bbclass: leave metadata in place if a PM is installed in the image Laurentiu Palcu
2013-09-05  7:31 ` [PATCH 1/1] " Laurentiu Palcu
2013-09-05  8:15   ` Martin Jansa
2013-09-05  8:57     ` Laurentiu Palcu
2013-09-05 10:43     ` Phil Blundell
2013-09-05 11:11       ` Laurentiu Palcu [this message]
2013-09-05 11:37         ` Phil Blundell
2013-09-05 11:40           ` Phil Blundell
2013-09-05 11:59             ` Laurentiu Palcu
2013-09-05 12:07               ` Phil Blundell
2013-09-05 12:19                 ` Paul Eggleton
2013-09-05 12:29                   ` Phil Blundell
2013-09-05 12:53                     ` Paul Eggleton
2013-09-05 13:14                       ` Laurentiu Palcu
2013-09-05 13:24                         ` Phil Blundell
2013-09-05 13:25                     ` Laurentiu Palcu
2013-09-05 12:42         ` ChenQi

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=20130905111155.GB17481@lpalcu-linux \
    --to=laurentiu.palcu@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.com \
    --cc=pb@pbcl.net \
    /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