chrpath.bbclass: Ensure we only process tmpdir in paths which actually contain that path
Submitted by Richard Purdie on Aug. 17, 2012, 4:41 p.m.
Patch ID: 34837
@@ -60,10 +60,12 @@ def process_dir (directory, d):
# NOTE: This will not work reliably for cross packages, particularly in the case
# where your TMPDIR is a short path (i.e. /usr/poky) as chrpath cannot insert an
# rpath longer than that which is already set.
+ elif rpath.find(tmpdir) != -1:
depth = fpath.rpartition(tmpdir).count('/')
libpath = rpath.partition(tmpdir).strip()
base = "$ORIGIN"
while depth > 1:
base += "/.."