[poky] [Errno 18] Invalid cross-device link warning coming from license file copy

matti kaasinen matti.kaasinen at gmail.com
Mon Aug 31 23:33:04 PDT 2015


So, it seems that I have following options to choose:
1) change TMPDIR value to point to /mnt/sw/TMPDIR (portable, but config
file templates require editing for next installers).
  This would require also bblayers.conf file editing with /mnt/sw
modifications.
2) move checkouts to my ssd: checkouts are not that big - possible.
3) patch copy_license_files function: easy and working, but makes updates
awkward.
4) wait for poky to patch copy_license_files function - won't happen I
suppose?
5) do nothing and live with all those warnings - most likely to happen.
Cheers,
Matti

2015-08-26 11:19 GMT+03:00 matti kaasinen <matti.kaasinen at gmail.com>:

> RIchard,
>
>
> 2015-08-25 17:12 GMT+03:00 Richard Purdie <
> richard.purdie at linuxfoundation.org>:
>
>> On Wed, 2015-08-19 at 15:48 +0300, matti kaasinen wrote:
>> > Is there any way of getting rid of warnings of following type:
>> >
>> > WARNING: Could not copy license file /YOCTO/poky/LICENSE
>> > to
>> /XXX/work/am335x_evm-poky-linux-gnueabi/xxxx-image/1.0-r0/license-destdir/xxx-image/LICENSE:
>> [Errno 18] Invalid cross-device link
>> >
>> >
>> > Yes, sources and results are located on different logical drives, but
>> > should it still be possible to copy files between them. Everything
>> > else works fine in bitbaking.
>>
>> Can you be a little more clear about what you did please? I assume you
>> changed TMPDIR to point to a different disk to the one where the poky
>> checkout is located?
>>
>
> Yes, you are absolutely right.
> I have a pretty small (120G) ssd disk I have installed my Ubuntu machine
> (/dev/sdb2). I try not to pollute it with checkouts and in particular
> builds. For that purpose I have reserved one partition from pretty moderate
> (1TB) hdd. Both checkouts (I have played with some distros) and TMPDIR live
> in there, but in different mount points. In fact, I do have also a mount
> point called /TMPDIR there.
>
>>
>> I'm still a little puzzled about why the existing check doesn't catch
>> the fact they're different disks...
>>
>
> Let's study how it works, first the mounts.
> As I told before, both the TMPDIR and checkouts (/YOCTO) live in /dev/sdb2
> that has been mounted in /mnt/sw. Let's see how they look in df and python
> os.stat listings.
>
> ==== df shell command
> ## /mnt is in ssd disk
> $ LANG=C df -H /mnt
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sdb2       110G   24G   80G  23% /
>
> ## sda2 partition of hdd disk mounted to /mnt/sw
> $ LANG=C df -H /mnt/sw
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sda2       572G  148G  395G  28% /mnt/sw
>
> ## same results by using /mnt/sw path
> $ LANG=C df -H /mnt/sw/TMPDIR
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sda2       572G  148G  395G  28% /mnt/sw
>
> ## same results again - in fact as path used same mountpoint /mnt/sw
> $ LANG=C df -H /mnt/sw/YOCTO
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sda2       572G  148G  395G  28% /mnt/sw
>
> ## let's test mountpoints /TMPDIR and /YOCTO - this is what
> copy_license_file tests:
>
> $ LANG=C df -H /TMPDIR
> Filesystem      Size  Used Avail Use% Mounted on
> /mnt/sw/TMPDIR  572G  148G  395G  28% /TMPDIR
>
> $ LANG=C df -H /YOCTO
> Filesystem      Size  Used Avail Use% Mounted on
> /mnt/sw/YOCTO   572G  148G  395G  28% /YOCTO
>
> ## It made difference both in "Filesystem" and "Mounted on" columns
> ## Let's make the test more close what copy_license_files function tests:
>
> $ LANG=C df -H /YOCTO/poky /TMPDIR/work
> Filesystem      Size  Used Avail Use% Mounted on
> /mnt/sw/YOCTO   572G  148G  395G  28% /YOCTO
> /mnt/sw/TMPDIR  572G  148G  395G  28% /TMPDIR
>
> ==== stat test using ipython
> In [9]: os.stat('/mnt').st_dev
> Out[9]: 2066L
>
> In [10]: os.stat('/mnt/sw').st_dev
> Out[10]: 2050L
>
> In [11]: os.stat('/mnt/sw/TMPDIR/work').st_dev
> Out[11]: 2050L
>
> In [12]: os.stat('/mnt/sw/YOCTO/poky').st_dev
> Out[12]: 2050L
>
> In [13]: os.stat('/YOCTO/poky').st_dev
> Out[13]: 2050L
>
> In [14]: os.stat('/TMPDIR/work').st_dev
> Out[14]: 2050L
>
> ## Above python tests show that all the tests except
> os.stat('/mnt').st_dev return /dev/sda2 mount point number (I guess).
>
> I hope you can get more clear picture of my mounts and how different kind
> of tests work.
> Cheers,
> Matti
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20150901/25b7203a/attachment.html>


More information about the poky mailing list