image class got error from copyhardlinktree/tar during migration to whinlatter
Peter Bergin <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm working on uprev for a layer from scarthgap to whinlatter. In the
layer there is a custom image class that will take part om the rootfs
and make a separate image of. First step is to copy out that part to a
separate directory before creating an image file. The function is using
copyhardlinktree from 'meta/lib/oe/path.py'. It has worked well in
scarthgap but when building in whinlatter I get this error:
0106:
0107: _from =
os.path.realpath(os.path.join(d.getVar("IMAGE_ROOTFS"), "data"))
0108: _to =
os.path.realpath(os.path.join(d.getVar("WORKDIR"), "data.copy.%s" %
d.getVar('BB_CURRENTTASK')))
0109:
*** 0110: copyhardlinktree(_from, _to)
0111:
...
Subprocess output:
tar: ./mydir: Cannot change ownership to uid 0, gid 0: Invalid
argument
tar: .: Cannot change ownership to uid 0, gid 0: Invalid argument
tar: Exiting with failure status due to previous errors
The directory 'mydir' is owned by root user in my target file system. I
would like to check if someone have seen similar things when going to
newer versions? Or if someone have an idea about the root cause? I did a
workaround and used 'shutil.copytree' to avoid this error but is curios
to find the root cause and understand why it fails.
Best regards,
/Peter