summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-07-20 16:51:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-26 20:15:48 +0100
commitb169dadb5fbf823a31140e28242c7d542b46f753 (patch)
treee7e64a0ef70631e7758c8e5cb2571a8843f502ad /bitbake/lib
parentc884b52dd0b790d6e3686be4260a3cceff8846bd (diff)
downloadpoky-b169dadb5fbf823a31140e28242c7d542b46f753.tar.gz
ui/crumbs/tasklistmodel: handle items added in by base image being removed
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] (Bitbake rev: 812ead4900714545850698d8ce29194f4ee8db0e) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/ui/crumbs/tasklistmodel.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
index 36a56736db..e6af74f312 100644
--- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
@@ -495,9 +495,23 @@ class TaskListModel(gtk.ListStore):
495 it = self.contents.iter_next(it) 495 it = self.contents.iter_next(it)
496 return userpkgs, allpkgs 496 return userpkgs, allpkgs
497 497
498 def image_contents_removed(self):
499 it = self.get_iter_first()
500 while it:
501 sel = self.get_value(it, self.COL_INC)
502 img = self.get_value(it, self.COL_IMG)
503 if img and not sel:
504 return True
505 it = self.iter_next(it)
506 return False
507
498 def get_build_rep(self): 508 def get_build_rep(self):
499 userpkgs, allpkgs = self.get_selected_packages() 509 userpkgs, allpkgs = self.get_selected_packages()
500 image = self.selected_image 510 # If base image contents have been removed start from an empty rootfs
511 if not self.selected_image or self.image_contents_removed():
512 image = "empty"
513 else:
514 image = self.selected_image
501 515
502 return BuildRep(" ".join(userpkgs), " ".join(allpkgs), image) 516 return BuildRep(" ".join(userpkgs), " ".join(allpkgs), image)
503 517