<?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>11001</bug_id>
          
          <creation_ts>2017-02-01 02:33:35 +0000</creation_ts>
          <short_desc>Failure in do_prepare_recipe_sysroot after interrupted build</short_desc>
          <delta_ts>2017-02-08 15:59:17 +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>2.3</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>normal</bug_severity>
          <target_milestone>2.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>70315</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-02-01 02:33:35 +0000</bug_when>
    <thetext>I interrupted a build of master recently, and this was the result when I tried to resume it:

----------------- snip -----------------
ERROR: util-macros-1_1.19.0-r0 do_prepare_recipe_sysroot: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:extend_recipe_sysroot(d)
     0003:
File: &apos;/home/paul/poky/poky/meta/classes/staging.bbclass&apos;, lineno: 577, function: extend_recipe_sysroot
     0573:                        continue
     0574:                    if native:
     0575:                        dest = staging_copyfile(l, recipesysrootnative, fixme[&apos;native&apos;], postinsts, stagingdir)
     0576:                    else:
 *** 0577:                        dest = staging_copyfile(l, destsysroot, fixme[&apos;&apos;], postinsts, stagingdir)
     0578:                    if dest:
     0579:                        m.write(dest.replace(workdir + &quot;/&quot;, &quot;&quot;) + &quot;\n&quot;)
     0580:
     0581:    for f in fixme:
File: &apos;/home/paul/poky/poky/meta/classes/staging.bbclass&apos;, lineno: 273, function: staging_copyfile
     0269:        os.symlink(linkto, dest)
     0270:        #bb.warn(c)
     0271:    else:
     0272:        try:
 *** 0273:            os.link(c, dest)
     0274:        except OSError as err:
     0275:            if err.errno == errno.EXDEV:
     0276:                bb.utils.copyfile(c, dest)
     0277:            else:
Exception: FileExistsError: [Errno 17] File exists: &apos;/home/paul/poky/poky/build/tmp/sysroots-components/core2-64/gcc-runtime/usr/include/c++/6.3.0/experimental/memory&apos; -&gt; &apos;/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/util-macros/1_1.19.0-r0/recipe-sysroot/usr/include/c++/6.3.0/experimental/memory&apos;

ERROR: util-macros-1_1.19.0-r0 do_prepare_recipe_sysroot: Function failed: extend_recipe_sysroot
ERROR: Logfile of failure stored in: /home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/util-macros/1_1.19.0-r0/temp/log.do_prepare_recipe_sysroot.20600
ERROR: Task (/home/paul/poky/poky/meta/recipes-graphics/xorg-util/util-macros_1.19.0.bb:do_prepare_recipe_sysroot) failed with exit code &apos;1&apos;
----------------- snip -----------------

I&apos;m not sure if we want to extend this to handle FileExistsError (or OSError with errno.EEXIST, same thing), or whether we should alternatively be doing something to avoid this scenario occurring.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70551</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-02-08 15:59:17 +0000</bug_when>
    <thetext>I&apos;m hoping http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=ab78c782f73be76cff55220b582b01d173d7f711 means this doesn&apos;t happen any more. Please reopen if problems persist.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>