Bug 3108

Summary: Packages are shown as brought in by 'User selected' when I've made no changes to the recipes in the base image
Product: [Build System, Metadata & Runtime] Hob Reporter: Belen Barros Pena <belen.barros.pena>
Component: hobAssignee: Constantin Musca <constantinx.musca>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alexandru.damian, bluelightning, cristian.iorga, poky.bs.watcher, poky.watcher, valentin.popa
Version: unspecified   
Target Milestone: 1.3 M5   
Hardware: x86   
OS: Multiple   
Whiteboard: a2783d2f644b6e7704439380df0884c5351bc190
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
sysvinit showing as 'user selected' none

Description Belen Barros Pena 2012-09-13 15:12:01 UTC
Created attachment 800 [details]
sysvinit showing as 'user selected'

Steps to reproduce:

1. Launch Hob
2. Select atom-pc as your machine and core-image-minimal as your base image
3. Click the 'edit image' button
4. Without making any changes to the recipes, click the 'build packages' button
5. In the 'Edit packages' screen, click on 'sysvinit' to display the 'brought in by' information

Outcome: the package appears as 'User selected', but I have not selected anything myself since I made no changes to the recipes before building the packages. 3 or 4 other packages on the table also appear as 'User selected'. I've attached a screenshot.

I might be missing something here, but I don't think these packages should be shown as 'Use selected'.
Comment 1 Constantin Musca 2012-09-26 09:08:06 UTC
You have selected an image which includes that package (that's why the package appears as "User selected").

Constantin
Comment 2 Belen Barros Pena 2012-09-27 14:10:28 UTC
mmm, I don't think your comment makes sense. As per your argument, all recipes and packages should appear as 'user selected' (because all of them come from the base image I selected), but they don't. For example, in the list of packages you get when you build a core-image-minimal for atom-pc, eglibc is not listed as user selected. 

The fact that only a few packages on the list appear as 'user selected' seems to indicate something funny going on. 

(In reply to comment #1)
> You have selected an image which includes that package (that's why the
> package appears as "User selected").
> 
> Constantin
Comment 3 Belen Barros Pena 2012-10-01 10:00:32 UTC
Constantin mentioned the following question over IM: "What happens if the user selects a package which is already brought in by another package? Should the 'User selected' text appear in "Brought in by"?"

In my opinion, if the package is already brought in by some other package, it should not appear as 'user selected', but this is from my limited understanding of things. Does anybody disagree with this approach?

Thanks!
Comment 4 Constantin Musca 2012-10-02 11:45:46 UTC
Bug fixed.

Changes:
- the 'User selected' tag is only used when the user selects a package
- fix hob to remember which packages are 'User selected'
- if the package is already brought in by some other package, it should not appear as 'User selected'
Comment 5 Belen Barros Pena 2012-10-02 13:41:35 UTC
verified