[bitbake-devel] [PATCH 25/32] Hob: Add an extra 50M space if zypper is selected

Xu, Dongxiao dongxiao.xu at intel.com
Thu Mar 1 04:19:31 UTC 2012


On Wed, 2012-02-29 at 13:29 -0800, Joshua Lock wrote:
> On 29/02/12 06:15, Shane Wang wrote:
> > From: Dongxiao Xu<dongxiao.xu at intel.com>
> >
> > An workaround to judge if zypper is selected, we will add an extra
> > 51200 KB to image size.
> 
> This sort of change sets alarms off, especially as we already have 
> variables in the core metadata to affect image size (one of which is 
> employed for this very reason) - are we not honouring those variables in 
> hob?

Thanks Josh for the suggestion.

The situation we are facing is that, Hob could only query the variable
values from bb.configuration.data, which doesn't include the
image_types.bbclass and rootfs_rpm.bbclass. Therefore it is not able to
get those variable's updated value in these classes.

Thanks,
Dongxiao

> 
> Cheers,
> Joshua
> >
> > Signed-off-by: Dongxiao Xu<dongxiao.xu at intel.com>
> > ---
> >   bitbake/lib/bb/ui/crumbs/packageselectionpage.py |    2 ++
> >   1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
> > index 5459743..89487c1 100755
> > --- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
> > +++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
> > @@ -180,6 +180,8 @@ class PackageSelectionPage (HobPage):
> >           image_overhead_factor = self.builder.configuration.image_overhead_factor
> >           image_rootfs_size = self.builder.configuration.image_rootfs_size
> >           image_extra_size = self.builder.configuration.image_extra_size
> > +        if "zypper" in self.builder.configuration.selected_packages:
> > +            image_extra_size += 51200
> >           base_size = image_overhead_factor * selected_packages_size
> >           image_total_size = max(base_size, image_rootfs_size) + image_extra_size
> >           image_total_size_str = self._size_to_string(image_total_size)
> 






More information about the bitbake-devel mailing list