[OE-core] [PATCH] rootfs_ipk: respect ONLINE_PACKAGE_MANAGEMENT

Richard Purdie richard.purdie at linuxfoundation.org
Thu May 19 12:16:36 UTC 2011


On Thu, 2011-05-19 at 12:41 +0100, Phil Blundell wrote:
> On Thu, 2011-05-19 at 12:21 +0100, Richard Purdie wrote:
> > On Thu, 2011-05-19 at 11:31 +0100, Phil Blundell wrote:
> > Agreed. I'd like to raise one other issue which is the number of
> > variables we need to control these things which are effectively binary
> > flags. I'm leaning towards having a small number of variables containing
> > flags which trigger certain behaviours. In this case the obvious choices
> > would be:
> 
> That's true, though one particular variable at hand is actually a
> trinary.  The behaviour that we have historically had in OE, which seems
> to capture most of the significant use-cases, is:
> 
> ONLINE_PACKAGE_MANAGEMENT="full" (or not set at all) means to install
> opkg or whatever and all its metadata, like oe-core does now
> 
> ONLINE_PACKAGE_MANAGEMENT="none" means to not install opkg or its
> metadata on the target at all;
> 
> ONLINE_PACKAGE_MANAGEMENT="add" means to install just enough package
> management infrastructure to allow new packages to be added after the
> fact, but not to allow packages that were shipped in the image to be
> manipulated.  I think the main use case for this was language packs and
> the like.
> 
> I'm not entirely sure that O_P_M="add" has ever actually worked properly
> (I don't use it myself) but it doesn't seem like an entirely worthless
> proposition.

This could be done as:

IMAGE_FEATURES = "packageaddonly"

with errors if two mutually exclusive flags were specified
("nopackagemanager packageaddonly").


Also, for reference in core-image.bbclass there is already this code:

   ${@base_contains("IMAGE_FEATURES", "package-management", "${ROOTFS_PKGMANAGE}", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)} \

which means OE-Core adds the package manager if requested
(ROOTFS_PKGMANAGE) and otherwise installs ROOTFS_PKGMANAGE_BOOTSTRAP
which corresponds to enough scripting to handle the postinstalls.

So if we:

a) Only add ROOTFS_PKGMANAGE_BOOTSTRAP if postinstalls were present
b) Add the read-only-rootfs option we discussed which errors if 
   postinstalls are present

we end up a lot closer to where you want to be.

Cheers,

Richard





More information about the Openembedded-core mailing list