Bug 4228 - Allow complementary globs to be extended
Summary: Allow complementary globs to be extended
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.4
Hardware: All Multiple
: Medium enhancement
Target Milestone: 1.5
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-04-08 17:02 UTC by Paul Eggleton
Modified: 2013-10-10 15:08 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2013-04-08 17:02:32 UTC
At the moment the complementary package globs as implemented in image.bbclass (the complementary_globs function) aren't easy to extend. We should split out the definitions to varflags e.g.:

COMPLEMENTARY_GLOB[dev-pkgs] = "*-dev"
COMPLEMENTARY_GLOB[dbg-pkgs] = "*-dbg"
...

The complementary_globs function can then be changed to read from these, and additional definitions can be added easily in distro configuration or additional image classes.
Comment 2 Stoicescu Cornel 2013-10-10 11:17:08 UTC
I have some concerns about this. I tested with the following steps:

1) with default local.conf, issue 'bitbake -g core-image-sato' and save package-depends.dot as package-depends.default

NOTE: I am using package-depends.dot because it shows the extra packages(-dev, -doc, etc)

2) add "dbg-pkgs" to EXTRA_IMAGE_FEATURES in local.conf, issue 'bitbake -g core-image-sato' and save package-depends.dot as package-depends.dbg

3) remove "dbg-pkgs" and add "dev-pkgs" to EXTRA_IMAGE_FEATURES in local.conf, issue 'bitbake -g core-image-sato' and save package-depends.dot as package-depends.dev

4) remove "dev-pkgs" and add "ptest-pkgs" to EXTRA_IMAGE_FEATURES in local.conf, issue 'bitbake -g core-image-sato' and save package-depends.dot as package-depends.ptest

5) Use 'diff' to see the differences between package-depends.default and the other saved package-depends.* files. Notice the differences are exactly the same.

This might be because of the way 'bitbake -g' works or not. My expectations here ware that when adding, for example, "dev-pkgs" to EXTRA_IMAGE_FEATURES in local.conf I would get the -dev packages corresponding to the packages already in my image. 

I am marking it as REOPENED in order to attract attention on this and get things sorted out.
Comment 3 Stoicescu Cornel 2013-10-10 11:19:24 UTC
Another mention here: 

Tested with poky master:102bf5e0f640fe85068452a42b85077f1c81e0c9

In this snapshot I was not able to find the exact changes in the patch posted here. The "def normal_groups(d):" chunk is missing probably due to intermediate changes to the image.bbclass file.
Comment 4 Paul Eggleton 2013-10-10 11:26:53 UTC
I would suggest examining the contents of an image (or buildhistory's installed package list) to verify this rather than relying on bitbake -g.
Comment 5 Stoicescu Cornel 2013-10-10 15:07:53 UTC
After using buildhistory's "installed-packages.txt" to analyze the packages inside images, the feature works as advertised.
Comment 6 Stoicescu Cornel 2013-10-10 15:08:09 UTC
As per the above comment.