Bug 11001 - Failure in do_prepare_recipe_sysroot after interrupted build
Summary: Failure in do_prepare_recipe_sysroot after interrupted build
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-02-01 02:33 UTC by Paul Eggleton
Modified: 2017-02-08 15:59 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2017-02-01 02:33:35 UTC
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: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:extend_recipe_sysroot(d)
     0003:
File: '/home/paul/poky/poky/meta/classes/staging.bbclass', lineno: 577, function: extend_recipe_sysroot
     0573:                        continue
     0574:                    if native:
     0575:                        dest = staging_copyfile(l, recipesysrootnative, fixme['native'], postinsts, stagingdir)
     0576:                    else:
 *** 0577:                        dest = staging_copyfile(l, destsysroot, fixme[''], postinsts, stagingdir)
     0578:                    if dest:
     0579:                        m.write(dest.replace(workdir + "/", "") + "\n")
     0580:
     0581:    for f in fixme:
File: '/home/paul/poky/poky/meta/classes/staging.bbclass', 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: '/home/paul/poky/poky/build/tmp/sysroots-components/core2-64/gcc-runtime/usr/include/c++/6.3.0/experimental/memory' -> '/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'

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 '1'
----------------- snip -----------------

I'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.
Comment 1 Richard Purdie 2017-02-08 15:59:17 UTC
I'm hoping http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=ab78c782f73be76cff55220b582b01d173d7f711 means this doesn't happen any more. Please reopen if problems persist.