diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-04-01 20:14:18 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-05 14:00:26 +0100 |
commit | c15d4a2ddef8b452b03209ccb207f767ae93af39 (patch) | |
tree | 9b93957f074dfea05ead5b5404d7c49f08053d7e /bitbake | |
parent | 7b560745f23d862cc3e48748b56bc8ce4ce84f72 (diff) | |
download | poky-c15d4a2ddef8b452b03209ccb207f767ae93af39.tar.gz |
Hob: fix IMAGE_INSTALL setting while save template
If save every selected package into IMAGE_INSTALL field, and then build
the saved bb file by bitbake command line, it will report errors since
some packages could not be found since they are dynamically generated.
With this commit, Hob will only save those packages into the
IMAGE_INSTALL variable which are brought in by user.
(Bitbake rev: 6c970d07422bb9a8fcf339315587cfc9b207a44e)
Signed-off-by: Dongxiao Xu <dongxiao.xu@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 | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hoblistmodel.py | 17 | ||||
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/packageselectionpage.py | 1 |
3 files changed, 21 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 8427623b37..9c2dd167cb 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -68,6 +68,8 @@ class Configuration: | |||
68 | self.selected_recipes = [] | 68 | self.selected_recipes = [] |
69 | self.selected_packages = [] | 69 | self.selected_packages = [] |
70 | 70 | ||
71 | self.user_selected_packages = [] | ||
72 | |||
71 | # proxy settings | 73 | # proxy settings |
72 | self.all_proxy = params["all_proxy"] | 74 | self.all_proxy = params["all_proxy"] |
73 | self.http_proxy = params["http_proxy"] | 75 | self.http_proxy = params["http_proxy"] |
@@ -157,7 +159,7 @@ class Configuration: | |||
157 | self.selected_image = filename | 159 | self.selected_image = filename |
158 | template.setVar("__SELECTED_IMAGE__", self.selected_image) | 160 | template.setVar("__SELECTED_IMAGE__", self.selected_image) |
159 | template.setVar("DEPENDS", self.selected_recipes) | 161 | template.setVar("DEPENDS", self.selected_recipes) |
160 | template.setVar("IMAGE_INSTALL", self.selected_packages) | 162 | template.setVar("IMAGE_INSTALL", self.user_selected_packages) |
161 | # proxy | 163 | # proxy |
162 | template.setVar("all_proxy", self.all_proxy) | 164 | template.setVar("all_proxy", self.all_proxy) |
163 | template.setVar("http_proxy", self.http_proxy) | 165 | template.setVar("http_proxy", self.http_proxy) |
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py index d4cae43892..52abf00eb0 100644 --- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py +++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py | |||
@@ -342,6 +342,23 @@ class PackageListModel(gtk.TreeStore): | |||
342 | self.selection_change_notification() | 342 | self.selection_change_notification() |
343 | return left | 343 | return left |
344 | 344 | ||
345 | def get_user_selected_packages(self): | ||
346 | packagelist = [] | ||
347 | |||
348 | it = self.get_iter_first() | ||
349 | while it: | ||
350 | child_it = self.iter_children(it) | ||
351 | while child_it: | ||
352 | if self.get_value(child_it, self.COL_INC): | ||
353 | binb = self.get_value(child_it, self.COL_BINB) | ||
354 | if not binb or binb == "User Selected": | ||
355 | name = self.get_value(child_it, self.COL_NAME) | ||
356 | packagelist.append(name) | ||
357 | child_it = self.iter_next(child_it) | ||
358 | it = self.iter_next(it) | ||
359 | |||
360 | return packagelist | ||
361 | |||
345 | def get_selected_packages(self): | 362 | def get_selected_packages(self): |
346 | packagelist = [] | 363 | packagelist = [] |
347 | 364 | ||
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py index d855e58aea..9a847c0f83 100755 --- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py | |||
@@ -160,6 +160,7 @@ class PackageSelectionPage (HobPage): | |||
160 | self._expand_all() | 160 | self._expand_all() |
161 | 161 | ||
162 | self.builder.configuration.selected_packages = self.package_model.get_selected_packages() | 162 | self.builder.configuration.selected_packages = self.package_model.get_selected_packages() |
163 | self.builder.configuration.user_selected_packages = self.package_model.get_user_selected_packages() | ||
163 | selected_packages_num = len(self.builder.configuration.selected_packages) | 164 | selected_packages_num = len(self.builder.configuration.selected_packages) |
164 | selected_packages_size = float(self.package_model.get_packages_size()) | 165 | selected_packages_size = float(self.package_model.get_packages_size()) |
165 | selected_packages_size_str = self._size_to_string(selected_packages_size) | 166 | selected_packages_size_str = self._size_to_string(selected_packages_size) |