[OE-core] [PATCH 1/1] chrpath.bbclass: Normalize rpath only of it doesn't contain ORIGIN variable

Andrei Gherzan andrei.gherzan at windriver.com
Fri Dec 14 02:15:03 UTC 2012


If we normalize a rpath which contains ORIGIN variable, the binary will end
up without those rpaths at all. So check first if rpath contains ORIGIN variable
and if not, move on and normalize it.

Signed-off-by: Andrei Gherzan <andrei.gherzan at windriver.com>
---
 meta/classes/chrpath.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 82329d1..0c7ab77 100644
--- a/meta/classes/chrpath.bbclass
+++ b/meta/classes/chrpath.bbclass
@@ -49,10 +49,10 @@ def process_dir (directory, d):
             new_rpaths = []
             for rpath in rpaths:
                 # If rpath is already dynamic copy it to new_rpath and continue
-                rpath =  os.path.normpath(rpath)
                 if rpath.find("$ORIGIN") != -1:
                     new_rpaths.append(rpath.strip())
                     continue
+                rpath =  os.path.normpath(rpath)
                 # If the rpath shares a root with base_prefix determine a new dynamic rpath from the
                 # base_prefix shared root
                 if rpath.find(basedir) != -1:
-- 
1.7.9.5





More information about the Openembedded-core mailing list