mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
relocatable.bbclass: Handle symlinks correctly
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
@@ -14,10 +14,15 @@ def rpath_replace (path, d):
|
|||||||
|
|
||||||
for d in bindirs:
|
for d in bindirs:
|
||||||
dir = path + "/" + d
|
dir = path + "/" + d
|
||||||
bb.note("Checking %s for binaries to process" % dir)
|
bb.debug("Checking %s for binaries to process" % dir)
|
||||||
if os.path.exists(dir):
|
if os.path.exists(dir):
|
||||||
for file in os.listdir(dir):
|
for file in os.listdir(dir):
|
||||||
fpath = dir + "/" + file
|
fpath = dir + "/" + file
|
||||||
|
if os.path.islink(fpath):
|
||||||
|
fpath = os.readlink(fpath)
|
||||||
|
if not os.path.isabs(fpath):
|
||||||
|
fpath = os.path.normpath(os.path.join(dir, fpath))
|
||||||
|
|
||||||
#bb.note("Testing %s for relocatability" % fpath)
|
#bb.note("Testing %s for relocatability" % fpath)
|
||||||
p = sub.Popen([cmd, '-l', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
|
p = sub.Popen([cmd, '-l', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
|
||||||
err, out = p.communicate()
|
err, out = p.communicate()
|
||||||
|
|||||||
Reference in New Issue
Block a user