Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] chrpath.bbclass: Ensure we only process tmpdir in paths which actually contain that path
@ 2012-08-17 16:41 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2012-08-17 16:41 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 8922248..659db31 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 += "/.."





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-17 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-17 16:41 [PATCH] chrpath.bbclass: Ensure we only process tmpdir in paths which actually contain that path Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox