Bug 1420

Summary: [HOB] duplicated brought in package list
Product: [Build System, Metadata & Runtime] Hob Reporter: Jiajun Xu <jiajun.xu>
Component: hobAssignee: Joshua Lock - Disabled <josh>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: andreea.b.proca, jessica.zhang, jiajun.xu, lianhao.lu, liping.ke, poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Jiajun Xu 2011-08-25 23:08:39 UTC
Tree/Branch: master
Commit: 6c2b7beac3cd23ed44bd3e195c6360a0932876bf

With latest master, when we click some package, like avahi, some packages will have duplicated "brought in by" packages. For example, e2fsprogs-badblocks is brought in by e2fsprogs and there are a lot of e2fsprogs in "brought in by" column.
Comment 1 Joshua Lock - Disabled 2011-08-26 11:25:44 UTC
I believe this is describing the intended behaviour caused by two recent changes.
Firstly, we switched to storing all packages provided by a recipe, rather than just the recipe itself, in the data model and operating at a package level of granularity.
Further, and per bug 1365, we switched to listing all of the reverse dependencies of a package in the 'Brought in by' column, rather than just the first package which brought the package in.

I believe this issue is appropriate to change to RESOLVED->NOTABUG, do you agree?
We do have bug 1423 querying the legitimacy of the entries in the 'Brought in by' column
Comment 2 Jiajun Xu 2011-08-28 19:20:42 UTC
(In reply to comment #1)
> I believe this is describing the intended behaviour caused by two recent
> changes.
> Firstly, we switched to storing all packages provided by a recipe, rather than
> just the recipe itself, in the data model and operating at a package level of
> granularity.
> Further, and per bug 1365, we switched to listing all of the reverse
> dependencies of a package in the 'Brought in by' column, rather than just the
> first package which brought the package in.
> I believe this issue is appropriate to change to RESOLVED->NOTABUG, do you
> agree?
> We do have bug 1423 querying the legitimacy of the entries in the 'Brought in
> by' column

Hi Josh,
The issue I meet is that if I select/deselect avahi for N times, N duplicated package name will be shown up in "Brought in By". You could have a try with avahi and check "Brought in By" column for package e2fsprogs-badblocks.

I find you have a patch to fix duplicated item to binb column as below. Will the patch fix the issue?

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/tasklistmodel.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 5ff1f5a..cf9fc59 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -441,8 +441,9 @@ class TaskListModel(gtk.ListStore):
             self[item_path][self.COL_INC] = True
 
         bin = self[item_path][self.COL_BINB].split(', ')
-        bin.append(binb)
-        self[item_path][self.COL_BINB] = ', '.join(bin).lstrip(', ')
+        if not binb in bin:
+            bin.append(binb)
+            self[item_path][self.COL_BINB] = ', '.join(bin).lstrip(', ')
 
         # We want to do some magic with things which are brought in by the
         # base image so tag them as so
-- 
1.7.6
Comment 3 Joshua Lock - Disabled 2011-08-29 16:23:59 UTC
Ah, thanks for clarifying! The patch you mention helps but there's a second loop in the same method that potentially modifies COL_BINB. I have a patch queued for submission to ensure duplicates aren't added there too.
Comment 5 Andreea Brandusa Proca 2013-10-03 08:15:43 UTC
Verified in master:4d8ab87d25ea6e59dc88375813ef88ee0ac813d0.
Comment 6 Andreea Brandusa Proca 2013-10-03 08:18:41 UTC
Verified.