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. 

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;

- 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;

- it makes it impossible to install opkg or suchlike without its
metadata, which has occasionally been a useful thing to do.

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.

p.


_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to