summaryrefslogtreecommitdiffstats
path: root/meta/classes/relocatable.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-02-22 14:20:26 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-02-22 14:20:26 +0000
commitdf76efbdee7b4e89759ba7da2a6297152cb0b7e0 (patch)
tree78507099125d35a43fba321abeb6c33f70c20b2b /meta/classes/relocatable.bbclass
parent814c3efb5c69fe340f0222de30e7077d6c07d3d1 (diff)
downloadopenembedded-core-contrib-df76efbdee7b4e89759ba7da2a6297152cb0b7e0.tar.gz
relocatable.bbclass: Handle symlinks correctly
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/relocatable.bbclass')
-rw-r--r--meta/classes/relocatable.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass
index 37e6610131e..9237b459ba6 100644
--- a/meta/classes/relocatable.bbclass
+++ b/meta/classes/relocatable.bbclass
@@ -14,10 +14,15 @@ def rpath_replace (path, d):
for d in bindirs:
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):
for file in os.listdir(dir):
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)
p = sub.Popen([cmd, '-l', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
err, out = p.communicate()