Bug 13337 - Error with rmt when image depends on both tar-native and cpio-native
Summary: Error with rmt when image depends on both tar-native and cpio-native
Status: RESOLVED WONTFIX
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 2.5.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5.4
Assignee: Armin Kuster
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-05-07 14:31 UTC by Ernst Persson
Modified: 2019-08-08 14:31 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
adjusted cherry-pick for sumo (3.36 KB, patch)
2019-05-10 11:42 UTC, Ernst Persson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ernst Persson 2019-05-07 14:31:32 UTC
myimage depended on tar-native from before, yocto 2.5.3 brought in cpio-native as a dependency also.
That gives the following error. The error only seems to happen on clean builds. If you try again it seems to continue.

ERROR: myimage-core-dev-1.0-r0 do_image_tar: 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/ernsjo/code/cu1/meta/poky/meta/classes/staging.bbclass', lineno: 545, function: extend_recipe_sysroot
     0541:                    dest = newmanifest[l]
     0542:                    if l.endswith("/"):
     0543:                        staging_copydir(l, targetdir, dest, seendirs)
     0544:                        continue
 *** 0545:                    staging_copyfile(l, targetdir, dest, postinsts, seendirs)
     0546:
     0547:    bb.note("Installed into sysroot: %s" % str(msg_adding))
     0548:    bb.note("Skipping as already exists in sysroot: %s" % str(msg_exists))
     0549:
File: '/home/ernsjo/code/cu1/meta/poky/meta/classes/staging.bbclass', lineno: 151, function: staging_copyfile
     0147:        os.symlink(linkto, dest)
     0148:        #bb.warn(c)
     0149:    else:
     0150:        try:
 *** 0151:            os.link(c, dest)
     0152:        except OSError as err:
     0153:            if err.errno == errno.EXDEV:
     0154:                bb.utils.copyfile(c, dest)
     0155:            else:
Exception: FileExistsError: [Errno 17] File exists: '/home/ernsjo/code/cu1/build/tmp/sysroots-components/x86_64/tar-native/sbin/rmt' -> '/home/ernsjo/code/cu1/build/tmp/work/lev_2-fslc-linux-gnueabi/myimage-core-dev/1.0-r0/recipe-sysroot-native/sbin/rmt'

ERROR: myimage-core-dev-1.0-r0 do_image_tar: Function failed: extend_recipe_sysroot
Comment 1 Ernst Persson 2019-05-07 14:32:36 UTC
I copied this snippet from image_types.bbclass to my image for tar-native:

do_image_tar[depends] += "tar-replacement-native:do_populate_sysroot"
EXTRANATIVEPATH += "tar-native"
Comment 3 Armin Kuster 2019-05-09 01:19:26 UTC
back ported to warrior-nmut
Comment 4 Ernst Persson 2019-05-10 11:42:42 UTC
Created attachment 4513 [details]
adjusted cherry-pick for sumo
Comment 5 Armin Kuster 2019-08-08 14:31:49 UTC
not in sumo. no plans on backporting