<?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>3221</bug_id>
          
          <creation_ts>2012-10-03 16:33:53 +0000</creation_ts>
          <short_desc>Save more space in WORKDIR with rm_work</short_desc>
          <delta_ts>2013-05-08 16:22:53 +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.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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>1.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>corneliux.stoicescu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26164</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-10-03 16:33:53 +0000</bug_when>
    <thetext>Current rm_work.bbclass implementation keeps some directories
&apos;temp&apos; &apos;package&apos; &apos;packages-split&apos;
in workdir even when they can be recreated from sstate package if we find out where to execute _setscene tasks correctly.

Another way (I&apos;m using right now) is to remove ${S} between do_install and do_package, this way we don&apos;t get source files packaged in PN-dbg, but saves a lot of space before disk space hungry do_package is executed.

Also because rm_work task was usually executed as almost last one, bitbake scheduler was executing it near the end of runqueue, with rm_sourcedir task before do_package we force ${S} removal much sooner.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26764</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-10-19 14:44:18 +0000</bug_when>
    <thetext>&apos;temp&apos; &apos;package&apos; &apos;packages-split&apos; need to stick around. We&apos;ve dicussed this before and I am not supporting any workflow which involves removing them as it complicates core code without good reason. There are better ways to save space.

For disabling the large -dbg packages, we should make including the source code a configuration option if it isn&apos;t already. 

I&apos;d also suggest we hardlink the source files to save space, this is a cheap and easy way to improve things that benefits everyone. Hardllinks are going to be a way of gaining a lot of space and hance performace back going forward.

So I suggest this enhacement be about using hardlinks for the -dbg source code and ensuring the source inclusion in -dbg packages is configurable *and* documented in the manual.

Creation of some new rm_work equivalent which removes ${S} before do_package is a separate issue. I don&apos;t really like the idea at all, I think there are better things to focus on than trying to fix random deletion of parts of the build tree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26765</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-10-19 14:47:43 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; &apos;temp&apos; &apos;package&apos; &apos;packages-split&apos; need to stick around. We&apos;ve dicussed this
&gt; before and I am not supporting any workflow which involves removing them as
&gt; it complicates core code without good reason. There are better ways to save
&gt; space.

IIRC you said that it&apos;s hard to know when exactly call those setscene tasks, not that it&apos;s impossible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26767</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-10-19 15:20:31 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; &apos;temp&apos; &apos;package&apos; &apos;packages-split&apos; need to stick around. We&apos;ve dicussed this
&gt; &gt; before and I am not supporting any workflow which involves removing them as
&gt; &gt; it complicates core code without good reason. There are better ways to save
&gt; &gt; space.
&gt; 
&gt; IIRC you said that it&apos;s hard to know when exactly call those setscene tasks,
&gt; not that it&apos;s impossible.

Nothing is impossible. It doesn&apos;t make it a good idea or means its a sane design.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29167</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-01-24 23:26:50 +0000</bug_when>
    <thetext>The do_package do_packagedata split that is proposed offers some potential to rm_work to allow removal of the package and package-split directories in rm_work. See the commit message for that change for more hints.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32594</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-04-24 16:00:45 +0000</bug_when>
    <thetext>This was resolved with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f090c1523f6fd600dde01e53250f9b1ea79219c6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32962</commentid>
    <comment_count>6</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-05-08 16:22:53 +0000</bug_when>
    <thetext>as advertised, the output of do_package is removed from the work directory. The &quot;temp&quot; directory is  saved as it only contains logs.

For a core-image-minimal it saved almost 1 GB. Verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>