Bug 3792

Summary: Missed development packages using IMAGE_FEATURES+="dev-pkgs"
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Abdellah Kouadri Ext <abdellah.kouadri.ext>
Component: meta-yoctoAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, Qi.Chen
Version: 1.3   
Target Milestone: 1.4 M4   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Abdellah Kouadri Ext 2013-01-24 09:42:07 UTC
When Adding "dev-pkgs" feature to IMAGE_FEATURE many development packages are not installed in the final rootfs

STEPS TO REPRODUCE:
--------------------
1.select packageXX and check that it provides packageXX-dev
2.set IMAGE_INSTAL+="packageXX"
3.set IMAGE_FEATURES+="dev-pkgs"
3.build the image using bitbake (bitbake my-image) 
4.check that files installed by packageXX-dev are not present in the generated rootfs

CAUSE :
--------

* To install complementary packages (dev, staticdev, doc ...) the script oe-pkgdata-util is called during rootfs generation. This script takes a file containing  all installed packages (installed_packages.txt) and computes the set of complementary packages to install (depending on what is contained in IMAGE_FEATURES). 

* Actually installed_packages.txt is a two columns file containing the package name and the architecture of the package, architecture of the package uses underscore as separator (ex : armv7a_vfp_neon).

* oe-pkgdata-util uses the architecture of a each package (from installed_packages.txt) to rebuilt the full path to packages data in order to check if it actually provides dev-pkgs, static-dev ...etc. (ex: build/tmp-eglibc/pkgdata/armv7a_vfp_neon-oe-linux-gnueabi)

* in the pkgdata directory  packages are grouped by their architecture in separate directories, but the directories name use dash as separator (ex: build/tmp-eglibc/pkgdata/armv7a-vfp-neon-oe-linux-gnueabi)

* due to the difference of the separator on the path reconstructed by   oe-pkgdata-util and the  path of pkgdata, oe-pkgdata-util  will miss the  installation of many packages.
Comment 1 Paul Eggleton 2013-02-06 09:42:32 UTC
When I build from master for beagleboard, I get architecture values in installed_pkgs.txt which use dashes and not underscores (e.g. armv7a-vfp-neon), so I can't verify the issue. Which version of the build system did you experience this issue with?
Comment 2 Abdellah Kouadri Ext 2013-02-06 10:11:16 UTC
I'm using version poky-danny-8.0 which i downloaded from 
https://www.yoctoproject.org/download/yocto-project-13-poky-80
Comment 3 Paul Eggleton 2013-02-06 14:09:03 UTC
OK, I've reproduced this with the danny-8.0 release and the danny branch, and have sent a fix:

http://lists.linuxtogo.org/pipermail/openembedded-core/2013-February/035554.html
Comment 4 Paul Eggleton 2013-02-14 20:38:54 UTC
Fix merged to the danny branch (and will be in the next danny point release):
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=danny&id=c0b37584819790a9c72b5dd5ad2533e499fa1d17

Note that this bug did not affect master since the code there works differently.