<?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>9064</bug_id>
          
          <creation_ts>2016-02-04 22:31:10 +0000</creation_ts>
          <short_desc>do_unpack does not wipe old source tree</short_desc>
          <delta_ts>2016-08-12 13:33:57 +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>BitBake</product>
          <component>bitbake</component>
          <version>2.0</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>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>2.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>markus.lehtonen</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Libertad">libertad.gonzalez.de.la.cruz</qa_contact>
          <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>58619</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-04 22:31:10 +0000</bug_when>
    <thetext>In the past I could do bitbake -C unpack [recipe] to force a recipe to rebuild from scratch, because the unpack task will be tainted and thus the unpack runs again.

It appears that now this is broken and if I do bitbake -C unpack it skips unpack and patch, going straight to configure.

(I&apos;m sure this worked a few weeks ago, so a bisect shouldn&apos;t be too long)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58707</commentid>
    <comment_count>1</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-02-07 19:48:10 +0000</bug_when>
    <thetext>Works for me just fine on master@4a2f42ff9e0f4359d1ee8290582f1b29a2202372:

build (master)&gt; bitbake -C unpack zlib -D |grep &apos; Executing task do_unpack&apos;
DEBUG: Executing task do_unpack</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58715</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-08 10:49:14 +0000</bug_when>
    <thetext>I&apos;m *certain* I saw this not working as it was causing problems.  Of course now I can&apos;t replicate.  I&apos;ll see if I can make it break.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59040</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-15 17:08:02 +0000</bug_when>
    <thetext>Managed to replicate this.

1) bitbake foo
2) touch a file in foo&apos;s ${S}
3) bitbake foo -C unpack

The file that was created in (2) still exists but (3) should have removed the source tree before unpacking again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59273</commentid>
    <comment_count>4</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-02-19 15:37:48 +0000</bug_when>
    <thetext>To me it seems bitbake works as expected. In most cases do_unpack just calls base_do_unpack(), which in turn, just extracts the source into ${S}. Not removing anything. So if you change something in ${S} it will be &quot;reset&quot; back to the expected orig state, but, if you create new files they are not removed.

What recipe did you try this with?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59274</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-19 15:51:30 +0000</bug_when>
    <thetext>My standard test is m4.  I&apos;m *sure* it used to erase before unpacking.  If it didn&apos;t really, then maybe it should?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59310</commentid>
    <comment_count>6</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-02-20 07:56:31 +0000</bug_when>
    <thetext>I just tested with m4 on two random commits in poky:
commit 23083e7e5e3a8ee81b346b2ee6084d9fc83e66b5
Date:   Thu Dec 3 16:02:27 2015 -0600

commit 87c4e58dda0e2f62b0c8e4ddc6bec244643b21af
Date:   Thu Mar 19 16:05:03 2015 +0000

It didn&apos;t cleanup S{S}. So I don&apos;t think it has ever done that (unless there was some short period somewhere where it did that).

But, I agree that it probably should clean it up. It would sound more consistent if the build would always operate on a pristine source tree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59373</commentid>
    <comment_count>7</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-02-23 11:57:34 +0000</bug_when>
    <thetext>Patch submitted:
http://lists.openembedded.org/pipermail/openembedded-core/2016-February/117916.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60267</commentid>
    <comment_count>8</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-03-22 07:25:49 +0000</bug_when>
    <thetext>Moving to 2.1M4.

I re-sent the patch:
http://lists.openembedded.org/pipermail/openembedded-core/2016-March/119295.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63958</commentid>
    <comment_count>9</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-13 23:58:41 +0000</bug_when>
    <thetext>This was implicated in causing devtool selftest failures on the autobuilder:

https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/582/steps/Running%20oe-selftest/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64776</commentid>
    <comment_count>10</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-08-02 07:23:21 +0000</bug_when>
    <thetext>Ah, it breaks usage of externalsrc :( What do you think about modifying externalsrc.bbclass so that it won&apos;t wipe ${S}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64827</commentid>
    <comment_count>11</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-08-03 08:59:35 +0000</bug_when>
    <thetext>Version 3 of the patch:
https://patchwork.openembedded.org/patch/128383/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65069</commentid>
    <comment_count>12</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-08-11 16:00:10 +0000</bug_when>
    <thetext>Merged in oe-core eccae514b71394ffaed8fc45dea7942152a334a1.  Moving milestone as this missed M2.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>