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

matti kaasinen matti.kaasinen at gmail.com
Wed Aug 26 01:19:16 PDT 2015


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/20150826/76136de2/attachment.html>


More information about the poky mailing list