]> code.ossystems Code Review - openembedded-core.git/commitdiff
relocatable.bbclass: Handle symlinks correctly
authorRichard Purdie <rpurdie@linux.intel.com>
Mon, 22 Feb 2010 14:20:26 +0000 (14:20 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 22 Feb 2010 14:20:26 +0000 (14:20 +0000)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/relocatable.bbclass

index 37e6610131ec3210be2041bea9ba74d07fd7f253..9237b459ba695997947b03c8d044cecf84729542 100644 (file)
@@ -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()