[oe-commits] org.oe.dev insane.bbclass: RPATH check was always true due to scanelf output including the file path.

likewise commit openembedded-commits at lists.openembedded.org
Fri Apr 27 00:06:44 UTC 2007


insane.bbclass: RPATH check was always true due to scanelf output including the file path.

Author: likewise at openembedded.org
Branch: org.openembedded.dev
Revision: 08836743b35748de650281b3729fe259eea5d217
ViewMTN: http://monotone.openembedded.org/revision.psp?id=08836743b35748de650281b3729fe259eea5d217
Files:
1
classes/insane.bbclass
Diffs:

#
# mt diff -r52b8f41a965e291eede4b4094b41d82b1b115c2f -r08836743b35748de650281b3729fe259eea5d217
#
# 
# 
# patch "classes/insane.bbclass"
#  from [3a03bd01885af7a8749b8d7c891e968eadae8bea]
#    to [695ccc2b28e5ca1ea1559a70ebc2b7b37d90b251]
# 
============================================================
--- classes/insane.bbclass	3a03bd01885af7a8749b8d7c891e968eadae8bea
+++ classes/insane.bbclass	695ccc2b28e5ca1ea1559a70ebc2b7b37d90b251
@@ -21,7 +21,8 @@ inherit package
 
 # We play a special package function
 inherit package
-PACKAGE_DEPENDS += "pax-utils-native chrpath-native"
+PACKAGE_DEPENDS += "pax-utils-native"
+#PACKAGE_DEPENDS += chrpath-native"
 PACKAGEFUNCS += " do_package_qa "
 
 
@@ -202,19 +203,25 @@ def package_qa_check_rpath(file,name,d):
     """
     import bb, os
     scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf')
+    #chrpath = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'chrpath')
     bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work"
     bad_dir_test = bb.data.getVar('TMPDIR', d, True)
     if not os.path.exists(scanelf):
-        bb.fatal("Can not check RPATH scanelf not found")
+        bb.fatal("Can not check RPATH, scanelf (part of pax-utils-native) not found")
+    #if not os.path.exists(chrpath):
+    #    bb.fatal("Can not fix RPATH, chrpath (part of chrpath-native) not found")
     if not bad_dir in bb.data.getVar('WORKDIR', d, True):
         bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check")
 
-    output = os.popen("%s -Byr %s" % (scanelf,file))
+    bb.note("%s -F%%r#F %s" % (scanelf,file))
+    output = os.popen("%s -F%%r#F %s" % (scanelf,file))
     txt    = output.readline().split()
     for line in txt:
         if bad_dir_test in line:
             package_qa_write_error( 1, name, file, d)
             bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file))
+            #bb.note("Fixing RPATH for you in %s" % file)
+            #os.popen("%s -r /lib %s" % (chrpath,file))
             return False
     return True
 






More information about the Openembedded-commits mailing list