[bitbake-devel] [PATCH 08/10] ui/crumbs/tasklistmodel: handle items added in by base image being removed

Joshua Lock josh at linux.intel.com
Tue Jul 26 18:46:42 UTC 2011


When building an image based on an existing image we need to correctly
handle removals from that images package set. Do so by testing if any of
the items brought in by the base image are removed and, if so, building
an image from scratch with all of the selected packages included.

Fixes [YOCTO #1232]

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

diff --git a/lib/bb/ui/crumbs/tasklistmodel.py b/lib/bb/ui/crumbs/tasklistmodel.py
index 36a5673..e6af74f 100644
--- a/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/lib/bb/ui/crumbs/tasklistmodel.py
@@ -495,9 +495,23 @@ class TaskListModel(gtk.ListStore):
             it = self.contents.iter_next(it)
         return userpkgs, allpkgs
 
+    def image_contents_removed(self):
+        it = self.get_iter_first()
+        while it:
+            sel = self.get_value(it, self.COL_INC)
+            img = self.get_value(it, self.COL_IMG)
+            if img and not sel:
+                return True
+            it = self.iter_next(it)
+        return False
+
     def get_build_rep(self):
         userpkgs, allpkgs = self.get_selected_packages()
-        image = self.selected_image
+        # If base image contents have been removed start from an empty rootfs
+        if not self.selected_image or self.image_contents_removed():
+            image = "empty"
+        else:
+            image = self.selected_image
 
         return BuildRep(" ".join(userpkgs), " ".join(allpkgs), image)
 
-- 
1.7.6





More information about the bitbake-devel mailing list