From df76efbdee7b4e89759ba7da2a6297152cb0b7e0 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 22 Feb 2010 14:20:26 +0000 Subject: relocatable.bbclass: Handle symlinks correctly Signed-off-by: Richard Purdie --- meta/classes/relocatable.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'meta/classes/relocatable.bbclass') diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass index 37e6610131..9237b459ba 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() -- cgit v1.2.3-54-g00ecf