Re: [yocto] image class got error from copyhardlinktree/tar during migration to whinlatter
Peter Bergin <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <[email protected]> |
Many thanks Gyorgy!!
Adding PSEUDO_INCLUDE_PATHS to my bblcass solved the issue.
Best regards,
/Peter
On 10/10/25 14:24, Gyorgy Sarvari via lists.yoctoproject.org wrote:
> On 10/10/25 13:54, Peter Bergin via lists.yoctoproject.org wrote:
>> 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.
>>
> One idea:
>
> There was one change recently, regarding how pseudo handles which paths
> to handle[1].
>
> In Scarthgap, everything is handled, unless it is explicitly excluded
> with the PSEUDO_IGNORE_PATHS variable. ${WORKDIR} was not excluded by
> default, and pseudo kept track of the permissions (except for the
> specific subfolders that were excluded).
>
> Currently nothing is handled, unless it is explicitly included with the
> PSEUDO_INCLUDE_PATHS - and ${WORKDIR} is not included by default, so
> pseudo doesn't keep track of it currently (except for he named subfolders).
>
> I would try adding something like 'PSUEDO_INCLUDE_PATHS +=
> "${WORKDIR}/data.copy"' or similar in local.conf, and see if it helps.
>
> [1]:
> https://git.openembedded.org/openembedded-core/commit/meta/conf/bitbake.conf?id=2502da81709f25de499277b28d33c915638c45f6
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#65917): https://lists.yoctoproject.org/g/yocto/message/65917
> Mute This Topic: https://lists.yoctoproject.org/mt/115687401/3617552
> Group Owner: [email protected]
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
>