Patchwork package install failure on systems without /sbin/ldconfig

login
register
mail settings
Submitter Amy Fong
Date July 9, 2012, 3:38 p.m.
Message ID <20120709153842.GA14986@windriver.com>
Download mbox | patch
Permalink /patch/31577/
State Accepted
Commit 3f85ab6d0d05a4e34fe73fa343d2b3b942fc69b7
Headers show

Comments

Amy Fong - July 9, 2012, 3:38 p.m.
Package install failures due to issues in post install rules.
    
package_do_shlibs only looks for libraries in a directory "lib", this should be
modified to the variable baselib.
    
ldconfig_postinst_fragment failure observed on systems without /sbin/ldconfig
        [ -x /sbin/ldconfig ] && /sbin/ldconfig
results in the post install rule returning a failure. Modify to
        if [ -x /sbin/ldconfig ]; then /sbin/ldconfig; fi
    
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
 package.bbclass |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 56ab25c..28a263c 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1151,7 +1151,7 @@  emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime"
 
 ldconfig_postinst_fragment() {
 if [ x"$D" = "x" ]; then
-	[ -x /sbin/ldconfig ] && /sbin/ldconfig
+	if [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi
 fi
 }
 
@@ -1261,7 +1261,7 @@  python package_do_shlibs() {
 		return
 		
 	lib_re = re.compile("^.*\.so")
-	libdir_re = re.compile(".*/lib$")
+	libdir_re = re.compile(".*/%s$" % d.getVar('baselib', True))
 
 	packages = d.getVar('PACKAGES', True)
 	targetos = d.getVar('TARGET_OS', True)