diff options
Diffstat (limited to 'bitbake/lib/bb')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 2 | ||||
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/imagedetailspage.py | 2 | ||||
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/packageselectionpage.py | 20 |
3 files changed, 16 insertions, 8 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index b347f6ddf4..07118aabd0 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -108,6 +108,8 @@ class Configuration: | |||
108 | self.extra_setting = {} | 108 | self.extra_setting = {} |
109 | self.toolchain_build = False | 109 | self.toolchain_build = False |
110 | self.image_fstypes = "" | 110 | self.image_fstypes = "" |
111 | self.image_size = None | ||
112 | self.image_packages = [] | ||
111 | # bblayers.conf | 113 | # bblayers.conf |
112 | self.layers = [] | 114 | self.layers = [] |
113 | # image/recipes/packages | 115 | # image/recipes/packages |
diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py index d5864136aa..268ac68b40 100755 --- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py +++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py | |||
@@ -369,6 +369,8 @@ class ImageDetailsPage (HobPage): | |||
369 | vallist = [] | 369 | vallist = [] |
370 | vallist.append(pkg_num) | 370 | vallist.append(pkg_num) |
371 | vallist.append(default_image_size) | 371 | vallist.append(default_image_size) |
372 | self.builder.configuration.image_size = default_image_size | ||
373 | self.builder.configuration.image_packages = self.builder.configuration.selected_packages | ||
372 | if self.build_succeeded: | 374 | if self.build_succeeded: |
373 | edit_packages_button = HobAltButton("Edit packages") | 375 | edit_packages_button = HobAltButton("Edit packages") |
374 | edit_packages_button.set_tooltip_text("Edit the packages included in your image") | 376 | edit_packages_button.set_tooltip_text("Edit the packages included in your image") |
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py index a4d86bd610..0cac92f026 100755 --- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py +++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py | |||
@@ -270,14 +270,17 @@ class PackageSelectionPage (HobPage): | |||
270 | selected_packages_size = self.package_model.get_packages_size() | 270 | selected_packages_size = self.package_model.get_packages_size() |
271 | selected_packages_size_str = HobPage._size_to_string(selected_packages_size) | 271 | selected_packages_size_str = HobPage._size_to_string(selected_packages_size) |
272 | 272 | ||
273 | image_overhead_factor = self.builder.configuration.image_overhead_factor | 273 | if self.builder.configuration.image_packages == self.builder.configuration.selected_packages: |
274 | image_rootfs_size = self.builder.configuration.image_rootfs_size / 1024 # image_rootfs_size is KB | 274 | image_total_size_str = self.builder.configuration.image_size |
275 | image_extra_size = self.builder.configuration.image_extra_size / 1024 # image_extra_size is KB | 275 | else: |
276 | base_size = image_overhead_factor * selected_packages_size | 276 | image_overhead_factor = self.builder.configuration.image_overhead_factor |
277 | image_total_size = max(base_size, image_rootfs_size) + image_extra_size | 277 | image_rootfs_size = self.builder.configuration.image_rootfs_size / 1024 # image_rootfs_size is KB |
278 | if "zypper" in self.builder.configuration.selected_packages: | 278 | image_extra_size = self.builder.configuration.image_extra_size / 1024 # image_extra_size is KB |
279 | image_total_size += (51200 * 1024) | 279 | base_size = image_overhead_factor * selected_packages_size |
280 | image_total_size_str = HobPage._size_to_string(image_total_size) | 280 | image_total_size = max(base_size, image_rootfs_size) + image_extra_size |
281 | if "zypper" in self.builder.configuration.selected_packages: | ||
282 | image_total_size += (51200 * 1024) | ||
283 | image_total_size_str = HobPage._size_to_string(image_total_size) | ||
281 | 284 | ||
282 | self.label.set_label("Packages included: %s\nSelected packages size: %s\nTotal image size: %s" % | 285 | self.label.set_label("Packages included: %s\nSelected packages size: %s\nTotal image size: %s" % |
283 | (selected_packages_num, selected_packages_size_str, image_total_size_str)) | 286 | (selected_packages_num, selected_packages_size_str, image_total_size_str)) |
@@ -297,6 +300,7 @@ class PackageSelectionPage (HobPage): | |||
297 | self.refresh_selection() | 300 | self.refresh_selection() |
298 | if not self.builder.customized: | 301 | if not self.builder.customized: |
299 | self.builder.customized = True | 302 | self.builder.customized = True |
303 | self.builder.configuration.initial_selected_image = self.builder.configuration.selected_image | ||
300 | self.builder.configuration.selected_image = self.recipe_model.__custom_image__ | 304 | self.builder.configuration.selected_image = self.recipe_model.__custom_image__ |
301 | self.builder.rcppkglist_populated() | 305 | self.builder.rcppkglist_populated() |
302 | 306 | ||