[OE-core] perform_packagecopy can't handle bindir==base_bindir and errors out
Koen Kooi
koen at dominion.thruhere.net
Mon Aug 4 10:49:55 UTC 2014
Hi,
I'm currently trying to combine {base_}{lib,bin}dir and have set base_prefix to /usr and redefined some other vars:
+# Try to move distro stuff under /usr
+# Keep /etc and friend in /
+base_prefix = "/usr"
+nonarch_base_libdir = "/lib"
+sysconfdir = "/etc"
+servicedir = "/srv"
+sharedstatedir = "/com"
+localstatedir = "/var"
This hits a few problems (see tcpwrapper patch), but a bigger problem is with perform_packagecopy and kmod:
ERROR: Error executing a python function in /build/scratch/angstrom-v2014.12/sources/openembedded-core/meta/recipes-kernel/kmod/kmod_git.bb:
The stack trace of python calls that resulted in this exception/failure was:
File: 'perform_packagecopy', lineno: 89, function: <module>
0085: else:
0086: bb.warn('%s: Unable to resolve dangling symlink: %s' % (pn, alt_target))
0087:
0088:
*** 0089:perform_packagecopy(d)
0090:
File: 'perform_packagecopy', lineno: 71, function: perform_packagecopy
0067: for alt_target in link_rename:
0068: src = '%s/%s' % (pkgdest, alt_target)
0069: dest = '%s/%s' % (pkgdest, link_rename[alt_target])
0070: link = os.readlink(src)
*** 0071: link_target = oe.path.realpath(src, pkgdest, True)
0072:
0073: if os.path.lexists(link_target):
0074: # Ok, the link_target exists, we can rename
0075: bb.note('%s: Rename (link) %s -> %s' % (pn, alt_target, link_rename[alt_target]))
File: '/build/scratch/angstrom-v2014.12/sources/openembedded-core/meta/lib/oe/path.py', lineno: 229, function: realpath
0225: raise OSError(errno.EINVAL, "file '%s' is not below root" % file)
0226:
0227: try:
0228: if use_physdir:
*** 0229: file = __realpath_rel(root, file[(len(root) - 1):], root, loop_cnt, assume_dir)
0230: else:
0231: file = __realpath(file, root, loop_cnt, assume_dir)[0]
0232: except OSError as e:
0233: if e.errno == errno.ELOOP:
File: '/build/scratch/angstrom-v2014.12/sources/openembedded-core/meta/lib/oe/path.py', lineno: 180, function: __realpath_rel
0176: # emit warning?
0177: pass
0178: else:
0179: (start, have_dir) = __realpath(os.path.join(start, d),
*** 0180: root, loop_cnt, assume_dir)
0181:
0182: assert(__is_path_below(start, root))
0183:
0184: return start
File: '/build/scratch/angstrom-v2014.12/sources/openembedded-core/meta/lib/oe/path.py', lineno: 200, function: __realpath
0196: assert(__is_path_below(tdir, root))
0197: else:
0198: tdir = root
0199:
*** 0200: file = __realpath_rel(tdir, target, root, loop_cnt, assume_dir)
0201:
0202: try:
0203: is_dir = os.path.isdir(file)
0204: except:
File: '/build/scratch/angstrom-v2014.12/sources/openembedded-core/meta/lib/oe/path.py', lineno: 169, function: __realpath_rel
0165: have_dir = True
0166:
0167: for d in rel_path.split(os.path.sep):
0168: if not have_dir and not assume_dir:
*** 0169: raise OSError(errno.ENOENT, "no such directory %s" % start)
0170:
0171: if d == os.path.pardir: # '..'
0172: if len(start) >= len(root):
0173: # do not follow '..' before root
Exception: OSError: [Errno 2] no such directory /build/scratch/angstrom-v2014.12/build/tmp-angstrom_next-eglibc/work/armv5te-angstrom-linux-gnueabi/kmod/18+gitAUTOINC+ae58de0fcb-r0/package/usr/usr
ERROR: Function failed: perform_packagecopy
ERROR: Logfile of failure stored in: /build/scratch/angstrom-v2014.12/build/tmp-angstrom_next-eglibc/work/armv5te-angstrom-linux-gnueabi/kmod/18+gitAUTOINC+ae58de0fcb-r0/temp/log.do_package.2519
ERROR: Task 801 (/build/scratch/angstrom-v2014.12/sources/openembedded-core/meta/recipes-kernel/kmod/kmod_git.bb, do_package) failed with exit code '1'
The contents of that dir:
koen at beast:/build/scratch/angstrom-v2014.12$ cd /build/scratch/angstrom-v2014.12/build/tmp-angstrom_next-eglibc/work/armv5te-angstrom-linux-gnueabi/kmod/18+gitAUTOINC+ae58de0fcb-r0/package/
koen at beast:/build/scratch/angstrom-v2014.12/build/tmp-angstrom_next-eglibc/work/armv5te-angstrom-linux-gnueabi/kmod/18+gitAUTOINC+ae58de0fcb-r0/package$ find .
.
./etc
./etc/depmod.d
./etc/modprobe.d
./usr
./usr/lib
./usr/lib/libkmod.so
./usr/lib/libkmod.so.2
./usr/lib/depmod.d
./usr/lib/depmod.d/search.conf
./usr/lib/modprobe.d
./usr/lib/libkmod.so.2.2.8
./usr/lib/pkgconfig
./usr/lib/pkgconfig/libkmod.pc
./usr/lib/libkmod.la
./usr/include
./usr/include/libkmod.h
./usr/bin
./usr/bin/kmod
./usr/bin/lsmod
./usr/sbin
./usr/sbin/modprobe
./usr/sbin/rmmod
./usr/sbin/modinfo
./usr/sbin/insmod
./usr/sbin/depmod
./usr/share
./usr/share/bash-completion
./usr/share/bash-completion/completions
./usr/share/bash-completion/completions/kmod
koen at beast:/build/scratch/angstrom-v2014.12/build/tmp-angstrom_next-eglibc/work/armv5te-angstrom-linux-gnueabi/kmod/18+gitAUTOINC+ae58de0fcb-r0/package$
I can't figure out why packagecopy wants to go into '/usr/usr', the kmod recipe itself seems fine.
regards,
Koen
More information about the Openembedded-core
mailing list