<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>2273</bug_id>
          
          <creation_ts>2012-04-10 08:40:12 +0000</creation_ts>
          <short_desc>Evaluate current image space settings</short_desc>
          <delta_ts>2017-08-07 09:43:24 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20115</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2012-04-10 08:40:12 +0000</bug_when>
    <thetext>For 1.3, we should look at the amount of extra space we currently allow for images; in particular it might be nice when an image has package_management enabled to give it some additional space to allow for additional packages to be installed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33682</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-06-07 00:50:10 +0000</bug_when>
    <thetext>This is really up to the downstream distros, there was a brief time before the postinstalls were run on the host, a minimal/systemd build was not large enough, but that is now solved.  I we really wanted we could check form package-management in the image creation and increase the IMAGE_OVERHEAD_FACTOR from 1.3 to say 1.5.

Assigning it to Laurentiu since he is about to look at the code also.

Thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34393</commentid>
    <comment_count>2</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2013-07-08 15:07:14 +0000</bug_when>
    <thetext>I&apos;ve been looking on this and, apparently, for rpm we already add a 50MB extra space if we use package management (http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7061af381277a20e4df455daac9754b73fcbe467).

Also, I&apos;ve seen a logic error in image size computation. Right now, it is done like that:

base_size = COMPUTED_SIZE * ${IMAGE_OVERHEAD_FACTOR}
base_size = ((base_size &gt; ${IMAGE_ROOTFS_SIZE} ? base_size : ${IMAGE_ROOTFS_SIZE}) + ${IMAGE_ROOTFS_EXTRA_SPACE})

The problem I spotted is when COMPUTED_SIZE * ${IMAGE_OVERHEAD_FACTOR} is less than but very close to ${IMAGE_ROOTFS_SIZE}, in which case the resulting image size will be always ${IMAGE_ROOTFS_SIZE} and there will be no free space on the image. So, in this case, IMAGE_OVERHEAD_FACTOR is useless. Even delayed postinstalls might fail in this case. Unless IMAGE_ROOTFS_EXTRA_SPACE is set...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75683</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-08-07 09:43:24 +0000</bug_when>
    <thetext>wic uses ROOTFS_SIZE variable to set partition size. This variable is calculated in image.bbclass get_rootfs_size function using IMAGE_ROOTFS_ALIGNMENT, IMAGE_OVERHEAD_FACTOR, IMAGE_ROOTFS_EXTRA_SPACE, IMAGE_ROOTFS_MAXSIZE and the actual size of rootfs directory returned by &apos;du -ks &lt;path to rootfs directory&gt;&apos;. This should be enough to handle size-related variables correctly.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>