Bug 8933

Summary: Image customisation package list does not show packages installed via dependencies
Product: [Build System, Metadata & Runtime] Toaster Reporter: Belen Barros Pena <belen.barros.pena>
Component: toasterAssignee: Michael Wood <michael.g.wood>
Status: VERIFIED FIXED QA Contact: Alexandru Roman <alexandru.costinx.roman>
Severity: normal    
Priority: Medium+ CC: alexandru.costinx.roman, belen.barros.pena, brian.avery, jessica.zhang, stanciux.mihail
Version: 2.0   
Target Milestone: 2.1 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Belen Barros Pena 2016-01-15 10:54:10 UTC
This applies to the following branch

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=elliot/toaster/ic-7

Steps to reproduce: 

1. Start Toaster with CUSTOM_IMAGE=1
2. Create a project with release 'master'
3. Build core-image-minimal
4. Go to the 'New custom image' page
5. Search for 'core-image-minimal openembedded-core' and click the 'customise' button
6. Give your custom image a name
7. In the package list, search for openssl and add it to your custom image
8. Build your custom image

When the build finishes, go to the packages included list in the build information, and search for openssl. 4 packages come up: openssl, plus its dependencies libssl and libcrypto, and also openssl-conf. 

Now go to the list of custom images in the project configuration and select your custom image. In the list of packages, search for openssl. On the list openssl has a 'remove package' button (i.e. it is presented as being installed in your custom image), but libcrypto, libssl and openssl-conf all show an 'add package' button (i.e. they are presented as not being installed in your custom image, but they are, as we know from the build information). So the image customisation section seems to have an incomplete list of packages installed.

The image customisation package list should be updated to reflect the outcome of the latest build of your custom image.
Comment 1 Elliot Smith 2016-01-15 14:43:50 UTC
I've tried this, and get the same result.

However, isn't there a problem earlier than post-build? When I add the openssl package in the custom image edit "Add | Remove" page, shouldn't its dependencies also be added to my image (i.e. libcrypto, libssl and openssl-conf)? At the moment, when I add openssl, those dependencies keep the "Add package" button, rather than switching to the "Delete package" button.
Comment 2 Belen Barros Pena 2016-01-17 13:23:27 UTC
(In reply to comment #1)
> I've tried this, and get the same result.
> 
> However, isn't there a problem earlier than post-build? When I add the
> openssl package in the custom image edit "Add | Remove" page, shouldn't its
> dependencies also be added to my image (i.e. libcrypto, libssl and
> openssl-conf)? At the moment, when I add openssl, those dependencies keep
> the "Add package" button, rather than switching to the "Delete package"
> button.

Yes, if we have dependency information for the package you have added. If we don't, the packages will be added at build time, but since we don't have the dependency information, we will not be able to tell you in advance which additional packages will be added to your image. I hope this makes sense.
Comment 3 Elliot Smith 2016-01-18 16:57:39 UTC
OK, I will investigate the post-build scenario you gave.
Comment 4 Elliot Smith 2016-01-18 17:43:21 UTC
Bug as described by Belen in elliot/toaster/ic-7-rebase.
Comment 5 Michael Wood 2016-02-11 15:01:19 UTC
Image customisation feature now updated and merged which should address this.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=30c132bc4726be90fadee419a588a8b8f2161380
Comment 6 Alexandru Roman 2016-02-16 11:48:37 UTC
Verified on master: a25858982ae313a13be95692496e4983c7bd4251