From: Richard Purdie Date: Fri, 17 Aug 2012 16:37:47 +0000 (+0000) Subject: chrpath.bbclass: Ensure we only process tmpdir in paths which actually contain that... X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0b92d7916d0f4106f16a1a301f7f2ea466b9411;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 --- diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass index 89222484b8f..659db31cb88 100644 --- a/meta/classes/chrpath.bbclass +++ b/meta/classes/chrpath.bbclass @@ -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. - else: + elif rpath.find(tmpdir) != -1: depth = fpath.rpartition(tmpdir)[2].count('/') libpath = rpath.partition(tmpdir)[2].strip() - + else: + new_rpaths.append(rpath.strip()) + continue base = "$ORIGIN" while depth > 1: base += "/.."