summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-17 16:37:47 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-17 17:45:12 +0100
commitb0b92d7916d0f4106f16a1a301f7f2ea466b9411 (patch)
treee5da1feb728570cf6fa36e5425781385f02b2ebc /meta
parente31d484042c61582e978c9116c026eb092159a10 (diff)
downloadpoky-b0b92d7916d0f4106f16a1a301f7f2ea466b9411.tar.gz
chrpath.bbclass: Ensure we only process tmpdir in paths which actually contain that path
Without this change, a path to "/lib/xxx" or "/usr/lib/xxx" would also attempt to be remapped to be relative to $ORIGIN which makes no sense. (From OE-Core rev: 73e2c12534856f14c1a94fb51874e9ba1655f07b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/chrpath.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 89222484b8..659db31cb8 100644
--- a/meta/classes/chrpath.bbclass
+++ b/meta/classes/chrpath.bbclass
@@ -60,10 +60,12 @@ def process_dir (directory, d):
60 # NOTE: This will not work reliably for cross packages, particularly in the case 60 # NOTE: This will not work reliably for cross packages, particularly in the case
61 # where your TMPDIR is a short path (i.e. /usr/poky) as chrpath cannot insert an 61 # where your TMPDIR is a short path (i.e. /usr/poky) as chrpath cannot insert an
62 # rpath longer than that which is already set. 62 # rpath longer than that which is already set.
63 else: 63 elif rpath.find(tmpdir) != -1:
64 depth = fpath.rpartition(tmpdir)[2].count('/') 64 depth = fpath.rpartition(tmpdir)[2].count('/')
65 libpath = rpath.partition(tmpdir)[2].strip() 65 libpath = rpath.partition(tmpdir)[2].strip()
66 66 else:
67 new_rpaths.append(rpath.strip())
68 continue
67 base = "$ORIGIN" 69 base = "$ORIGIN"
68 while depth > 1: 70 while depth > 1:
69 base += "/.." 71 base += "/.."