<div style="font-family: Helvetica; font-size: 13px; ">rm_old_work seems to do exactly what it sounds like. It removes *old* workdirs from previous versions of the recipe to keep it from bloating without bound if you retain the same tmpdir.<br></div>
<div><div><br></div><div>-- </div><div>Christopher Larson</div><div><br></div></div>
<p style="color: #A0A0A8;">On Monday, March 19, 2012 at 1:32 PM, Denys Dmytriyenko wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>On Fri, Mar 16, 2012 at 07:41:52AM +0100, Martin Jansa wrote:</div><blockquote type="cite"><div><div>On Thu, Mar 15, 2012 at 02:18:44PM -0400, Denys Dmytriyenko wrote:</div><blockquote type="cite"><div><div>On Thu, Mar 15, 2012 at 10:21:22AM +0100, Martin Jansa wrote:</div><blockquote type="cite"><div><div>On Thu, Mar 15, 2012 at 05:09:36PM +0800, Kang Kai wrote:</div><blockquote type="cite"><div><div>On 2012???03???15??? 16:03, Martin Jansa wrote:</div><blockquote type="cite"><div><div>On Thu, Mar 15, 2012 at 03:40:04PM +0800, Kang Kai wrote:</div><blockquote type="cite"><div><div>On 2012???03???15??? 14:55, Kang Kai wrote:</div><blockquote type="cite"><div><div>On 2012???03???14??? 17:42, Richard Purdie wrote:</div><blockquote type="cite"><div><div>On Wed, 2012-03-14 at 17:01 +0800, Kang Kai wrote:</div><blockquote type="cite"><div><div>Hi All,</div><div><br></div><div>I write a script to clean up WORKDIR that remove the obsoleted</div><div>packages' build directories.</div><div>The script accept a argument as BUILDDIR and I use this clause to</div><div>identify the WORKDIR:</div><div><br></div><div> workdir = os.path.join(builddir, 'tmp/work')</div><div><br></div><div>Then validate the workdir exists or not. It works for me but hardcode</div><div>here as Richard point out.</div><div>So is there a better way to get the WORKDIR here? Thanks.</div></div></blockquote><div>I was thinking of something like:</div><div><br></div><div>bitbake -e | grep ^WORKDIR</div></div></blockquote></div></blockquote><div>And the result is something like that:</div><div>WORKDIR="/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/x86_64-poky-linux/bblayers-1.0-r0"</div><div><br></div><div>Is it ok to remove 2 items seperated by slash at the end of string?</div><div>Right now is:</div><div>"/mnt/sda10/poky-all-platform/build-qemux86_64/tmp/work/"</div></div></blockquote><div>Aren't you looking for ^TMPDIR ?</div></div></blockquote><div><br></div><div>If use WORKDIR = TMPDIR/"work", it is still hard coding.</div></div></blockquote><div><br></div><div>Assuming 2 items at the end won't work for people using rm_old_work:</div><div><a href="http://git.openembedded.org/meta-micro/commit/?id=fcf525654915edb9650f1a6c2852f336366f8b2f">http://git.openembedded.org/meta-micro/commit/?id=fcf525654915edb9650f1a6c2852f336366f8b2f</a></div><div>or slightly different version:</div><div><a href="http://git.shr-project.org/git/?p=meta-smartphone.git;a=blob;f=meta-shr/classes/rm_old_work.bbclass">http://git.shr-project.org/git/?p=meta-smartphone.git;a=blob;f=meta-shr/classes/rm_old_work.bbclass</a></div></div></blockquote><div><br></div><div>Martin,</div><div><br></div><div>Can you please point me to more details about this class - any background or </div><div>discussions... Thanks.</div></div></blockquote><div><br></div><div>Hi,</div><div><br></div><div>Well it works better then rm_work with sstate and the original class is</div><div>from meta-micro (so maybe ask pb if you want more details, but the class</div><div>is quite simple). I've just replaced last directory name because of this</div><div>issue:</div><div><br></div><div><a href="http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=0d4c17de1ba7343d82bb10c311754e29d573c485">http://git.shr-project.org/git/?p=meta-smartphone.git;a=commit;h=0d4c17de1ba7343d82bb10c311754e29d573c485</a></div></div></blockquote><div><br></div><div>Martin,</div><div><br></div><div>Hmm, my understanding those are slightly different classes - rm_work cleans </div><div>WORKDIR after the build to save space, while this rm_old_work seems to clean </div><div>up before the build. I tried searching for any previous discussions of this </div><div>class or any other rationale, but even the commit itself doesn't provide much </div><div>explanation for it...</div><div><br></div><div>Phil,</div><div><br></div><div>Do you mind giving a short description of this peculiar rm_old_work class? :) </div><div>Thanks.</div><div><br></div><div>-- </div><div>Denys</div><div><br></div><div><br></div><blockquote type="cite"><div><blockquote type="cite"><div><blockquote type="cite"><div><div>And I think more people have different "tmp/" part e.g. default would be</div><div>"tmp-eglibc/" (thanks to TCLIBCAPPEND</div><div>meta/conf/distro/defaultsetup.conf:TMPDIR .= "${TCLIBCAPPEND}"), but "work" is </div><div>quite common.</div><div><br></div><div>meta/conf/bitbake.conf:</div><div>WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}"</div><div>meta-shr/classes/rm_old_work.bbclass:</div><div>WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${PF}"</div><div>meta-micro/classes/rm_old_work.bbclass:</div><div>WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"</div><div><br></div><div>Cheers,</div><div><br></div><blockquote type="cite"><div><div><br></div><blockquote type="cite"><blockquote type="cite"><div><div>Regards,</div><div>Kai</div><div><br></div><blockquote type="cite"><div><div>If get WORKDIR in this way, I'll update the script with no argument</div><div>because the argument is useless to identify the WORKDIR.</div><div><br></div><div>Regards,</div><div>Kai</div><blockquote type="cite"><div><div>since you already call into bitbake in the script in question.</div><div><br></div><div>Cheers,</div><div><br></div><div>Richard</div></div></blockquote><div><br></div><div>_______________________________________________</div><div>bitbake-devel mailing list</div><div><a href="mailto:bitbake-devel@lists.openembedded.org">bitbake-devel@lists.openembedded.org</a></div><div><a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel</a></div></div></blockquote><div><br></div><div>_______________________________________________</div><div>bitbake-devel mailing list</div><div><a href="mailto:bitbake-devel@lists.openembedded.org">bitbake-devel@lists.openembedded.org</a></div><div><a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel</a></div></div></blockquote></blockquote></div></blockquote><div><br></div><div>-- </div><div>Martin 'JaMa' Jansa jabber: <a href="mailto:Martin.Jansa@gmail.com">Martin.Jansa@gmail.com</a></div></div></blockquote><div><br></div><div><br></div><div><br></div><blockquote type="cite"><div><div>_______________________________________________</div><div>bitbake-devel mailing list</div><div><a href="mailto:bitbake-devel@lists.openembedded.org">bitbake-devel@lists.openembedded.org</a></div><div><a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel</a></div></div></blockquote></div></blockquote><div><br></div><div>-- </div><div>Martin 'JaMa' Jansa jabber: <a href="mailto:Martin.Jansa@gmail.com">Martin.Jansa@gmail.com</a></div></div></blockquote><div><br></div><div><br></div><div><br></div><div>_______________________________________________</div><div>bitbake-devel mailing list</div><div><a href="mailto:bitbake-devel@lists.openembedded.org">bitbake-devel@lists.openembedded.org</a></div><div><a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>