diff options
author | Constantin Musca <constantinx.musca@intel.com> | 2012-10-01 14:03:22 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-02 11:40:55 +0100 |
commit | a2783d2f644b6e7704439380df0884c5351bc190 (patch) | |
tree | b26548ef330ca212209352ac043b1fa4060d7fcb /bitbake | |
parent | 2df5a30ef01ef0897dc4579529d33579a8641405 (diff) | |
download | poky-a2783d2f644b6e7704439380df0884c5351bc190.tar.gz |
bitbake: hob: Fix 'User selected' tag functionality
- 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'
[YOCTO #3108]
(Bitbake rev: 2391e9ba7034d4f90bafa5732d8efa8166f69950)
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 11 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hoblistmodel.py | 8 |
2 files changed, 13 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index fd555b0e7c..6ddc5b67fb 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -127,6 +127,7 @@ class Configuration: | |||
127 | self.selected_recipes = [] | 127 | self.selected_recipes = [] |
128 | self.selected_packages = [] | 128 | self.selected_packages = [] |
129 | self.initial_selected_packages = [] | 129 | self.initial_selected_packages = [] |
130 | self.initial_user_selected_packages = [] | ||
130 | 131 | ||
131 | def split_proxy(self, protocol, proxy): | 132 | def split_proxy(self, protocol, proxy): |
132 | entry = [] | 133 | entry = [] |
@@ -576,6 +577,7 @@ class Builder(gtk.Window): | |||
576 | self.handler.generate_packages(all_recipes, self.configuration.default_task) | 577 | self.handler.generate_packages(all_recipes, self.configuration.default_task) |
577 | 578 | ||
578 | def restore_initial_selected_packages(self): | 579 | def restore_initial_selected_packages(self): |
580 | self.package_model.set_selected_packages(self.configuration.initial_user_selected_packages, True) | ||
579 | self.package_model.set_selected_packages(self.configuration.initial_selected_packages) | 581 | self.package_model.set_selected_packages(self.configuration.initial_selected_packages) |
580 | for package in self.configuration.selected_packages: | 582 | for package in self.configuration.selected_packages: |
581 | if package not in self.configuration.initial_selected_packages: | 583 | if package not in self.configuration.initial_selected_packages: |
@@ -709,6 +711,7 @@ class Builder(gtk.Window): | |||
709 | 711 | ||
710 | elif next_step == self.PACKAGE_SELECTION: | 712 | elif next_step == self.PACKAGE_SELECTION: |
711 | self.configuration.initial_selected_packages = self.configuration.selected_packages | 713 | self.configuration.initial_selected_packages = self.configuration.selected_packages |
714 | self.configuration.initial_user_selected_packages = self.configuration.user_selected_packages | ||
712 | self.package_details_page.set_title("Edit packages") | 715 | self.package_details_page.set_title("Edit packages") |
713 | if self.recipe_model.get_selected_image() == self.recipe_model.__custom_image__: | 716 | if self.recipe_model.get_selected_image() == self.recipe_model.__custom_image__: |
714 | self.package_details_page.set_packages_curr_tab(self.package_details_page.ALL) | 717 | self.package_details_page.set_packages_curr_tab(self.package_details_page.ALL) |
@@ -782,7 +785,10 @@ class Builder(gtk.Window): | |||
782 | self.recipe_model.set_selected_image(selected_image) | 785 | self.recipe_model.set_selected_image(selected_image) |
783 | self.recipe_model.set_selected_recipes(selected_recipes) | 786 | self.recipe_model.set_selected_recipes(selected_recipes) |
784 | 787 | ||
785 | def update_package_model(self, selected_packages): | 788 | def update_package_model(self, selected_packages, user_selected_packages=None): |
789 | if user_selected_packages: | ||
790 | left = self.package_model.set_selected_packages(user_selected_packages, True) | ||
791 | self.configuration.user_selected_packages += left | ||
786 | left = self.package_model.set_selected_packages(selected_packages) | 792 | left = self.package_model.set_selected_packages(selected_packages) |
787 | self.configuration.selected_packages += left | 793 | self.configuration.selected_packages += left |
788 | 794 | ||
@@ -924,11 +930,12 @@ class Builder(gtk.Window): | |||
924 | selected_image = self.configuration.selected_image | 930 | selected_image = self.configuration.selected_image |
925 | selected_recipes = self.configuration.selected_recipes[:] | 931 | selected_recipes = self.configuration.selected_recipes[:] |
926 | selected_packages = self.configuration.selected_packages[:] | 932 | selected_packages = self.configuration.selected_packages[:] |
933 | user_selected_packages = self.configuration.user_selected_packages[:] | ||
927 | 934 | ||
928 | self.image_configuration_page.update_image_combo(self.recipe_model, selected_image) | 935 | self.image_configuration_page.update_image_combo(self.recipe_model, selected_image) |
929 | self.image_configuration_page.update_image_desc() | 936 | self.image_configuration_page.update_image_desc() |
930 | self.update_recipe_model(selected_image, selected_recipes) | 937 | self.update_recipe_model(selected_image, selected_recipes) |
931 | self.update_package_model(selected_packages) | 938 | self.update_package_model(selected_packages, user_selected_packages) |
932 | 939 | ||
933 | def recipelist_changed_cb(self, recipe_model): | 940 | def recipelist_changed_cb(self, recipe_model): |
934 | self.recipe_details_page.refresh_selection() | 941 | self.recipe_details_page.refresh_selection() |
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py index fe58adfbc4..3885319759 100644 --- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py | |||
@@ -337,13 +337,13 @@ class PackageListModel(gtk.TreeStore): | |||
337 | set_selected_packages(), some packages will not be set included. | 337 | set_selected_packages(), some packages will not be set included. |
338 | Return the un-set packages list. | 338 | Return the un-set packages list. |
339 | """ | 339 | """ |
340 | def set_selected_packages(self, packagelist): | 340 | def set_selected_packages(self, packagelist, user_selected=False): |
341 | left = [] | 341 | left = [] |
342 | binb = 'User Selected' if user_selected else '' | ||
342 | for pn in packagelist: | 343 | for pn in packagelist: |
343 | if pn in self.pkg_path.keys(): | 344 | if pn in self.pkg_path.keys(): |
344 | path = self.pkg_path[pn] | 345 | path = self.pkg_path[pn] |
345 | self.include_item(item_path=path, | 346 | self.include_item(item_path=path, binb=binb) |
346 | binb="User Selected") | ||
347 | else: | 347 | else: |
348 | left.append(pn) | 348 | left.append(pn) |
349 | 349 | ||
@@ -359,7 +359,7 @@ class PackageListModel(gtk.TreeStore): | |||
359 | while child_it: | 359 | while child_it: |
360 | if self.get_value(child_it, self.COL_INC): | 360 | if self.get_value(child_it, self.COL_INC): |
361 | binb = self.get_value(child_it, self.COL_BINB) | 361 | binb = self.get_value(child_it, self.COL_BINB) |
362 | if not binb or binb == "User Selected": | 362 | if binb == "User Selected": |
363 | name = self.get_value(child_it, self.COL_NAME) | 363 | name = self.get_value(child_it, self.COL_NAME) |
364 | packagelist.append(name) | 364 | packagelist.append(name) |
365 | child_it = self.iter_next(child_it) | 365 | child_it = self.iter_next(child_it) |