Bug 5304

Summary: License warning when building any package
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Laszlo Papp <lpapp>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, ross.burton
Version: unspecified   
Target Milestone: 1.6   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Laszlo Papp 2013-10-02 14:05:07 UTC
See the output below. Basically, the "TEST: foo" lines are my debug prints for the destdir itself. The files exist as expected, so we thought this would be a permission issue maybe. I have not tracked it down that much. All I can say, I have taken a look at the bb.copyfile internals, but that looks sane to me, and it tries to catch all the errors possible.

I am using dylan 9.0.1 as you can see the folder names below. Also, I am using debian wheezy (7.0) in a 32 bit "system-nspawn".


WARNING: TEST: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/kmod/9-r0.0/license-destdir/kmod
WARNING: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/meta/files/common-licenses/GPL-2.0 could not be copied for some reason. It may not exist. WARN for now.
WARNING: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/meta/files/common-licenses/LGPL-2.1 could not be copied for some reason. It may not exist. WARN for now.
WARNING: TEST: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/pciutils/3.1.10-r0/license-destdir/pciutils
WARNING: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/meta/files/common-licenses/GPL-2.0 could not be copied for some reason. It may not exist. WARN for now.
WARNING: TEST: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/util-linux/2.22.2-r3/license-destdir/util-linux
WARNING: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/meta/files/common-licenses/GPL-2.0 could not be copied for some reason. It may not exist. WARN for now.
WARNING: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/meta/files/common-licenses/LGPL-2.1 could not be copied for some reason. It may not exist. WARN for now.
WARNING: TEST: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/x86_64-linux/libxslt-native/1.1.28-r0/license-destdir/libxslt-native
WARNING: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/meta/files/common-licenses/MIT could not be copied for some reason. It may not exist. WARN for now.
WARNING: TEST: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/usbutils/006-r0/license-destdir/usbutils
WARNING: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/meta/files/common-licenses/GPL-2.0 could not be copied for some reason. It may not exist. WARN for now.
WARNING: /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/meta/files/common-licenses/BSD could not be copied for some reason. It may not exist. WARN for now.
Comment 1 Laszlo Papp 2013-10-02 14:11:22 UTC
You can see the stat output for a few of those below. The seem to match a pattern:

stat /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/kmod/9-r0.0/license-destdir/kmod
  File: `/home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/kmod/9-r0.0/license-destdir/kmod'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 807h/2055d      Inode: 5521419     Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1000/   lpapp)   Gid: ( 1000/   lpapp)
Access: 2013-10-02 14:54:56.681623564 +0100
Modify: 2013-10-02 14:54:56.678290230 +0100
Change: 2013-10-02 14:54:56.678290230 +0100
 Birth: -
lpapp ~/Projects/Yocto/poky-dylan-9.0.1/build $ 
lpapp ~/Projects/Yocto/poky-dylan-9.0.1/build $ stat /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/pciutils/3.1.10-r0/license-destdir/pciutils
  File: `/home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/pciutils/3.1.10-r0/license-destdir/pciutils'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 807h/2055d      Inode: 6051992     Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1000/   lpapp)   Gid: ( 1000/   lpapp)
Access: 2013-10-02 14:54:56.734956895 +0100
Modify: 2013-10-02 14:54:56.731623563 +0100
Change: 2013-10-02 14:54:56.731623563 +0100
 Birth: -
lpapp ~/Projects/Yocto/poky-dylan-9.0.1/build $ stat /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/util-linux/2.22.2-r3/license-destdir/util-linux
  File: `/home/lpapp/Projects/Yocto/poky-dylan-9.0.1/build/tmp/work/armv5te-foo-linux-gnueabi/util-linux/2.22.2-r3/license-destdir/util-linux'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 807h/2055d      Inode: 4880997     Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1000/   lpapp)   Gid: ( 1000/   lpapp)
Access: 2013-10-02 14:54:56.921623555 +0100
Modify: 2013-10-02 14:54:56.918290221 +0100
Change: 2013-10-02 14:54:56.918290221 +0100
 Birth: -
Comment 2 Laszlo Papp 2013-10-03 07:15:11 UTC
We replaced the print statements inside bb.copyfile to bb.warn with Ross, and then it seems we get a bit more information.

It seems that the chmod/own execution fails. I am not sure why. "find . -not `whoami`" did not return anything, so every file should be owned by the user.
Comment 3 Ross Burton 2013-10-03 08:23:56 UTC
I sent a patch to oe-core that changes the use of bb.utils.copyfile in license.bbclass to shutil.copyfile which avoids this problem by not chowning anything.  I expect it will apply cleanly to dylan.
Comment 4 Laszlo Papp 2013-10-03 08:44:26 UTC
That sounds like a good idea to me, thanks.
Comment 5 Ross Burton 2013-11-05 13:17:44 UTC
This patch was integrated as oe-core dc81df215cc94c279991df35125d94770a1bc3d2, closing.
Comment 6 Laszlo Papp 2013-11-05 13:18:21 UTC
Thanks, Ross!