Skip to contentSkip to conversation

why is "package-management" defined as a PACKAGE_GROUP?

DISCUSSION Robert P. J. Day 3 participants 12 messages Nov 17, 2013 – Nov 18, 2013

lore
Share & tools
lore
#0 lore raw

think i may have asked this once upon a time, but why, in
core-image.bbclass, is there the line:

  PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

as i read it, package-management doesn't represent an actual package group, but rather represents one of a number of IMAGE_FEATURES that are processed explicitly in a .bbclass file, like "debug-tweaks" or "read-only-rootfs". so what does the above line mean?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw

Hi Robert,

Quoted 9 lines · On Sunday 17 November 2013 04:19:19 Robert P. J. Day wrote:

think i may have asked this once upon a time, but why, in
core-image.bbclass, is there the line:

  PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

as i read it, package-management doesn't represent an actual package group, but rather represents one of a number of IMAGE_FEATURES that are processed explicitly in a .bbclass file, like "debug-tweaks" or "read-only-rootfs". so what does the above line mean?

It's not a package group, but then neither are any of the things defined by PACKAGE_GROUP - that variable just specifies one or more packages to be installed when the specified item appears in IMAGE_FEATURES. Perhaps we should just rename the variable; it's a little more internal than some of the other variables we've renamed in the past.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw
Quoted 14 lines · Paul Eggleton

Hi Robert,

Quoted 10 lines · On Sunday 17 November 2013 04:19:19 Robert P. J. Day wrote:

think i may have asked this once upon a time, but why, in
core-image.bbclass, is there the line:

  PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

as i read it, package-management doesn't represent an actual package group, but rather represents one of a number of IMAGE_FEATURES that are processed explicitly in a .bbclass file, like "debug-tweaks" or "read-only-rootfs". so what does the above line mean?

Quoted 6 lines

It's not a package group, but then neither are any of the things defined by PACKAGE_GROUP - that variable just specifies one or more packages to be installed when the specified item appears in IMAGE_FEATURES. Perhaps we should just rename the variable; it's a little more internal than some of the other variables we've renamed in the past.

oh, i realize it's not a package group, my point was that that line
seems entirely superfluous since, as with things like "debug-tweaks" and "read-only-rootfs", that "image feature" is processed explicitly within image.bbclass:

# IMAGE_FEATURES may contain any available package group IMAGE_FEATURES ?= ""
IMAGE_FEATURES[type] = "list"
IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs package-management"

# rootfs bootstrap install
ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"

the simple solution would seem to be to just delete the line:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

from core-image.bbclass since it's both unnecessary and misleading.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#3 lore raw
Quoted 35 lines · On Sunday 17 November 2013 06:30:01 Robert P. J. Day wrote:
Quoted 12 lines · Paul Eggleton
Quoted 10 lines · On Sunday 17 November 2013 04:19:19 Robert P. J. Day wrote:

think i may have asked this once upon a time, but why, in

core-image.bbclass, is there the line:
PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

as i read it, package-management doesn't represent an actual package group, but rather represents one of a number of IMAGE_FEATURES that are processed explicitly in a .bbclass file, like "debug-tweaks" or "read-only-rootfs". so what does the above line mean?

Quoted 6 lines

It's not a package group, but then neither are any of the things defined by PACKAGE_GROUP - that variable just specifies one or more packages to be installed when the specified item appears in IMAGE_FEATURES. Perhaps we should just rename the variable; it's a little more internal than some of the other variables we've renamed in the past.

oh, i realize it's not a package group, my point was that that line
seems entirely superfluous since, as with things like "debug-tweaks" and "read-only-rootfs", that "image feature" is processed explicitly within image.bbclass:

# IMAGE_FEATURES may contain any available package group IMAGE_FEATURES ?= ""
IMAGE_FEATURES[type] = "list" IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs package-management"

# rootfs bootstrap install
ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES",
"package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
Quoted 5 lines

the simple solution would seem to be to just delete the line:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

from core-image.bbclass since it's both unnecessary and misleading.

It's not unnecessary - how else does the actual package manager make it into the image when package-management is in IMAGE_FEATURES?

Now, this functionality should definitely be available from image.bbclass; this should get fixed with the rework I've proposed in the following bug:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5424

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#4 lore raw
Quoted 42 lines · Paul Eggleton
Quoted 35 lines · On Sunday 17 November 2013 06:30:01 Robert P. J. Day wrote:
Quoted 12 lines · Paul Eggleton
Quoted 10 lines · On Sunday 17 November 2013 04:19:19 Robert P. J. Day wrote:

think i may have asked this once upon a time, but why, in

core-image.bbclass, is there the line:
PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

as i read it, package-management doesn't represent an actual package group, but rather represents one of a number of IMAGE_FEATURES that are processed explicitly in a .bbclass file, like "debug-tweaks" or "read-only-rootfs". so what does the above line mean?

Quoted 6 lines

It's not a package group, but then neither are any of the things defined by PACKAGE_GROUP - that variable just specifies one or more packages to be installed when the specified item appears in IMAGE_FEATURES. Perhaps we should just rename the variable; it's a little more internal than some of the other variables we've renamed in the past.

oh, i realize it's not a package group, my point was that that line
seems entirely superfluous since, as with things like "debug-tweaks" and "read-only-rootfs", that "image feature" is processed explicitly within image.bbclass:

# IMAGE_FEATURES may contain any available package group IMAGE_FEATURES ?= ""
IMAGE_FEATURES[type] = "list" IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs package-management"

# rootfs bootstrap install
ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES",
"package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
Quoted 5 lines

the simple solution would seem to be to just delete the line:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

from core-image.bbclass since it's both unnecessary and misleading.

Quoted 8 lines

It's not unnecessary - how else does the actual package manager make it into the image when package-management is in IMAGE_FEATURES?

Now, this functionality should definitely be available from image.bbclass; this should get fixed with the rework I've proposed in the following bug:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5424

leaving aside the bug report, i am now hopelessly confused. are you
saying this line:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

from core-image.bbclass is currently *necessary* to properly support the image feature of "package-management" in core images? i don't see how or why. using that logic, you'd also need lines of that form for "read-only-rootfs" and "debug-tweaks", which certainly don't exist.

are you sure you're answering the question i'm asking?

rday

p.s. i just don't see how that line has any value based on a few simple tests i ran. using dora to build for a beagle xm, i can display some variables:

$ bb show -r core-image-base IMAGE_FEATURES
Parsing recipes..done.
IMAGE_FEATURES="debug-tweaks splash"
$ bb show -r core-image-base
EXTRA_IMAGE_FEATURES
Parsing recipes..done.
EXTRA_IMAGE_FEATURES="debug-tweaks"
$

which looks correct. now let's edit my local.conf and change:

EXTRA_IMAGE_FEATURES = "debug-tweaks"

to

EXTRA_IMAGE_FEATURES = "debug-tweaks package-management"

save, exit and verify:

$ bb show -r core-image-base IMAGE_FEATURES
Parsing recipes..done.
IMAGE_FEATURES="debug-tweaks splash package-management"
$ bb show -r core-image-base
EXTRA_IMAGE_FEATURES
Parsing recipes..done.
EXTRA_IMAGE_FEATURES="debug-tweaks package-management"

good. and now, let's edit core-image.bbclass and remove the line:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

save, exit and test:

$ bb show -r core-image-base IMAGE_FEATURES
Parsing recipes..done.
IMAGE_FEATURES="debug-tweaks splash package-management"
$ bb show -r core-image-base
EXTRA_IMAGE_FEATURES
Parsing recipes..done.
EXTRA_IMAGE_FEATURES="debug-tweaks package-management"
$

seems like the "package-management" image feature is being picked up
just fine.

#5 lore raw
Quoted 60 lines · Robert P. J. Day

leaving aside the bug report, i am now hopelessly confused. are you
saying this line:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

from core-image.bbclass is currently *necessary* to properly support the image feature of "package-management" in core images? i don't see how or why. using that logic, you'd also need lines of that form for "read-only-rootfs" and "debug-tweaks", which certainly don't exist.

are you sure you're answering the question i'm asking?

rday

p.s. i just don't see how that line has any value based on a few simple tests i ran. using dora to build for a beagle xm, i can display some variables:

$ bb show -r core-image-base IMAGE_FEATURES
Parsing recipes..done.
IMAGE_FEATURES="debug-tweaks splash"
$ bb show -r core-image-base
EXTRA_IMAGE_FEATURES
Parsing recipes..done.
EXTRA_IMAGE_FEATURES="debug-tweaks"
$

which looks correct. now let's edit my local.conf and change:

EXTRA_IMAGE_FEATURES = "debug-tweaks"

to

EXTRA_IMAGE_FEATURES = "debug-tweaks package-management"

save, exit and verify:

$ bb show -r core-image-base IMAGE_FEATURES
Parsing recipes..done.
IMAGE_FEATURES="debug-tweaks splash package-management"
$ bb show -r core-image-base
EXTRA_IMAGE_FEATURES
Parsing recipes..done.
EXTRA_IMAGE_FEATURES="debug-tweaks package-management"

good. and now, let's edit core-image.bbclass and remove the line:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

save, exit and test:

$ bb show -r core-image-base IMAGE_FEATURES
Parsing recipes..done.
IMAGE_FEATURES="debug-tweaks splash package-management"
$ bb show -r core-image-base
EXTRA_IMAGE_FEATURES
Parsing recipes..done.
EXTRA_IMAGE_FEATURES="debug-tweaks package-management"
$
Quoted 3 lines

seems like the "package-management" image feature is being picked up
just fine.

This test you did makes no sense. Of course it’s in IMAGE_FEATURES, you put it there. What you didn’t check is whether ${ROOTFS_PKGMANAGE} ended up being installed in the image, which it won’t be.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#6 lore raw
Quoted 62 lines · Chris Larson

On Sun, Nov 17, 2013 at 5:45 AM, Robert P. J. Day <[email protected]> wrote:
  leaving aside the bug report, i am now hopelessly confused. are you saying this line:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

from core-image.bbclass is currently *necessary* to properly support the image feature of "package-management" in core images? i don't see how or why. using that logic, you'd also need lines of that form for "read-only-rootfs" and "debug-tweaks", which certainly don't exist.

  are you sure you're answering the question i'm asking?

rday

p.s.  i just don't see how that line has any value based on a few simple tests i ran. using dora to build for a beagle xm, i can display some variables:

$ bb show -r core-image-base IMAGE_FEATURES
Parsing recipes..done.
IMAGE_FEATURES="debug-tweaks splash"
$ bb show -r core-image-base
EXTRA_IMAGE_FEATURES
Parsing recipes..done.
EXTRA_IMAGE_FEATURES="debug-tweaks"
$

which looks correct. now let's edit my local.conf and change:

EXTRA_IMAGE_FEATURES = "debug-tweaks"

to

EXTRA_IMAGE_FEATURES = "debug-tweaks package-management"

save, exit and verify:

$ bb show -r core-image-base IMAGE_FEATURES Parsing recipes..done. IMAGE_FEATURES="debug-tweaks splash package-management" $ bb show -r core-image-base EXTRA_IMAGE_FEATURES
Parsing recipes..done. EXTRA_IMAGE_FEATURES="debug-tweaks package-management"

good. and now, let's edit core-image.bbclass and remove the line:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

save, exit and test:

$ bb show -r core-image-base IMAGE_FEATURES Parsing recipes..done. IMAGE_FEATURES="debug-tweaks splash package-management" $ bb show -r core-image-base EXTRA_IMAGE_FEATURES
Parsing recipes..done. EXTRA_IMAGE_FEATURES="debug-tweaks package-management" $

Quoted 8 lines

  seems like the "package-management" image feature is being picked up just fine.

This test you did makes no sense. Of course it’s in IMAGE_FEATURES, you put it there. What you didn’t check is whether ${ROOTFS_PKGMANAGE} ended up being installed in the image, which it won’t be.

ah, i think i see my misunderstanding, i will experiment further and
clarify it for myself, thanks.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#7 lore raw
In reply to Chris Larson

On Sun, 17 Nov 2013, Chris Larson wrote:

... huge snip that i hope won't be necessary ...

Quoted 4 lines

This test you did makes no sense. Of course it’s in IMAGE_FEATURES, you put it there. What you didn’t check is whether ${ROOTFS_PKGMANAGE} ended up being installed in the image, which it won’t be.

i think i see my basic and fatal misunderstanding, and if you can
tolerate one more post, i want to make sure i know what i did wrong as i want to write this up and i want to be accurate.

as i understood it (apparently incorrectly), IMAGE_FEATURES fell
into two categories:

1) actual package groups, as defined in core-image.bbclass, as in:

PACKAGE_GROUP_x11 = "packagegroup-core-x11" PACKAGE_GROUP_x11-base = "packagegroup-core-x11-base" PACKAGE_GROUP_x11-sato = "packagegroup-core-x11-sato"

2) non-package group values that were processed independently by
code in image.bbclass, such as "read-only-rootfs" or "debug-tweaks"

what i *thought* was that each setting had to be one *or* the other,
but not both. so when i saw code in image.bbclass that was handling the "package-management" IMAGE_FEATURE, i immediately assumed that meant it couldn't *also* represent an actual package group. is that where i went wrong?

so, in this one case for the IMAGE FEATURE "package-management",
there is an actual package group defined as:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

which represents the packages:

$ bb show -r core-image-base ROOTFS_PKGMANAGE
Parsing recipes..done.
# ROOTFS_PKGMANAGE=opkg opkg-collateral ${EXTRAOPKGCONFIG}
ROOTFS_PKGMANAGE="opkg opkg-collateral poky-feed-config-opkg"
$

but that feature *also* pulls in additional processing as it's defined in image.bbclass.

have i finally got it right?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#8 lore raw
Quoted 9 lines · Robert P. J. Day
$ bb show -r core-image-base ROOTFS_PKGMANAGE
Parsing recipes..done.
# ROOTFS_PKGMANAGE=opkg opkg-collateral ${EXTRAOPKGCONFIG}
ROOTFS_PKGMANAGE="opkg opkg-collateral poky-feed-config-opkg"
$

but that feature *also* pulls in additional processing as it's defined in image.bbclass.

If you’re referring to the bootstrap bits, technically that doesn’t do something when it’s included in image features, it does something when it’s *not* included in image features — include ROOTFS_PKGMANAGE_BOOTSTRAP instead of ROOTFS_PKGMANAGE.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#9 lore raw
Quoted 8 lines · Chris Larson

On Sun, Nov 17, 2013 at 9:17 AM, Robert P. J. Day <[email protected]> wrote:

      $ bb show -r core-image-base ROOTFS_PKGMANAGE
      Parsing recipes..done.
      # ROOTFS_PKGMANAGE=opkg opkg-collateral ${EXTRAOPKGCONFIG}
      ROOTFS_PKGMANAGE="opkg opkg-collateral poky-feed-config-opkg"
      $
Quoted 8 lines

but that feature *also* pulls in additional processing as it's defined in image.bbclass.

If you’re referring to the bootstrap bits, technically that doesn’t do something when it’s included in image features, it does something when it’s *not* included in image features — include ROOTFS_PKGMANAGE_BOOTSTRAP instead of ROOTFS_PKGMANAGE.

ah, right ... but i did identify my earlier confusion, that
"package-management" is indeed a valid packagegroup, i just foolishly didn't understand that. thanks.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#10 lore raw
In reply to Robert P. J. Day

Hi Robert,

Quoted 13 lines · On Sunday 17 November 2013 11:17:13 Robert P. J. Day wrote:

On Sun, 17 Nov 2013, Chris Larson wrote:

... huge snip that i hope won't be necessary ...

Quoted 4 lines

This test you did makes no sense. Of course it’s in IMAGE_FEATURES, you put it there. What you didn’t check is whether ${ROOTFS_PKGMANAGE} ended up being installed in the image, which it won’t be.

i think i see my basic and fatal misunderstanding, and if you can
tolerate one more post, i want to make sure i know what i did wrong as i want to write this up and i want to be accurate.

Quoted 8 lines

as i understood it (apparently incorrectly), IMAGE_FEATURES fell
into two categories:

1) actual package groups, as defined in core-image.bbclass, as in:

PACKAGE_GROUP_x11 = "packagegroup-core-x11" PACKAGE_GROUP_x11-base = "packagegroup-core-x11-base" PACKAGE_GROUP_x11-sato = "packagegroup-core-x11-sato"

As I keep saying, these aren't package groups despite the name of the variable. Please stop calling them that. All they say is that if "x11" is present in IMAGE_FEATURES, bring in packagegroup-core-x11. The fact that these *do* point to actual package groups as packages is pretty much incidental.

Quoted 9 lines

2) non-package group values that were processed independently by
code in image.bbclass, such as "read-only-rootfs" or "debug-tweaks"

what i *thought* was that each setting had to be one *or* the other,
but not both. so when i saw code in image.bbclass that was handling the "package-management" IMAGE_FEATURE, i immediately assumed that meant it couldn't *also* represent an actual package group. is that where i went wrong?

Quoted 4 lines

so, in this one case for the IMAGE FEATURE "package-management",
there is an actual package group defined as:

PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"

Not a package group.

Quoted 8 lines

which represents the packages:

$ bb show -r core-image-base ROOTFS_PKGMANAGE
Parsing recipes..done.
# ROOTFS_PKGMANAGE=opkg opkg-collateral ${EXTRAOPKGCONFIG}
ROOTFS_PKGMANAGE="opkg opkg-collateral poky-feed-config-opkg"
$
Quoted 4 lines

but that feature *also* pulls in additional processing as it's defined in image.bbclass.

have i finally got it right?

In that there are several things at work dealing with the single "package- management" item, yes.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#11 lore raw
Quoted 25 lines · Paul Eggleton

Hi Robert,

Quoted 13 lines · On Sunday 17 November 2013 11:17:13 Robert P. J. Day wrote:

On Sun, 17 Nov 2013, Chris Larson wrote:

... huge snip that i hope won't be necessary ...

Quoted 4 lines

This test you did makes no sense. Of course it’s in IMAGE_FEATURES, you put it there. What you didn’t check is whether ${ROOTFS_PKGMANAGE} ended up being installed in the image, which it won’t be.

i think i see my basic and fatal misunderstanding, and if you can
tolerate one more post, i want to make sure i know what i did wrong as i want to write this up and i want to be accurate.

Quoted 8 lines

as i understood it (apparently incorrectly), IMAGE_FEATURES fell
into two categories:

1) actual package groups, as defined in core-image.bbclass, as in:

PACKAGE_GROUP_x11 = "packagegroup-core-x11" PACKAGE_GROUP_x11-base = "packagegroup-core-x11-base" PACKAGE_GROUP_x11-sato = "packagegroup-core-x11-sato"

Quoted 5 lines

As I keep saying, these aren't package groups despite the name of the variable. Please stop calling them that. All they say is that if "x11" is present in IMAGE_FEATURES, bring in packagegroup-core-x11. The fact that these *do* point to actual package groups as packages is pretty much incidental.

yes, i think i finally figured it out, and it was that variable name
prefix "PACKAGE_GROUP" that kept throwing me. in fact, it might have been clearer if the terminology used had been:

IMAGE_FEATURE_x11 = "... package list for feature x11 ..." IMAGE_FEATURE_x11-base = "... package list for feature x11-base ..."

etc, etc. so it's finally sunk in that, no, there's nothing magic about a "packagegroup", it's just a way of abbreviating a package list corresponding to a value in IMAGE_FEATURES.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================