<?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>12197</bug_id>
          
          <creation_ts>2017-10-06 12:13:23 +0000</creation_ts>
          <short_desc>Don&apos;t have persistent build directories</short_desc>
          <delta_ts>2020-11-29 11:59:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>5</classification_id>
          <classification>Infrastructure</classification>
          <product>AutoBuilder</product>
          <component>autobuilder</component>
          <version>2.2</version>
          <rep_platform>x86</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>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>infras.ab.watcher</cc>
    
    <cc>Infras.watcher</cc>
    
    <cc>pidge</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77421</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-10-06 12:13:23 +0000</bug_when>
    <thetext>There&apos;s a class of bugs which are subtle or hidden on the autobuilder because they related to build directory reuse through sstate.  Paths should be transformed away but that doesn&apos;t always happen.  The problem on the AB is that every tmpdir on the AB cluster exists on every build, so if a package does want to touch a file in the wrong tmpdir then it can.

So how about:
1) When the buildset starts, rm previous-build/ and set currentbuild=$(mktempd build-XXXXXX)
2) oe-init-build-env $currentbuild etc
3) When buildset finished, mv $currentbuild previous-build

This ensures that the paths are no longer valid for reuse in other builds via sstate, but the actual build directory exists for future debugging if required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79922</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2018-03-22 08:46:03 +0000</bug_when>
    <thetext>This change will need to be made in the helper scripts now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88686</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-11-29 11:59:18 +0000</bug_when>
    <thetext>We actually fixed this ages ago!

If builds succeed, the build directory is now destroyed.

If builds fail, the build directory is renamed &quot;build-renamed&quot; but preserved.

At the end of a build the directory therefore no longer exists in its default name but is preserved until the next build in case of failure. I think this addresses this issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>