[oe-commits] Mike Crowe : libcap: Cope with ${libdir} and ${base_libdir} being the same

git at git.openembedded.org git at git.openembedded.org
Wed Feb 8 00:50:04 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: bf136334aecc156c73eed76562819351de368eec
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=bf136334aecc156c73eed76562819351de368eec

Author: Mike Crowe <mac at mcrowe.com>
Date:   Mon Feb  6 13:34:22 2012 +0000

libcap: Cope with ${libdir} and ${base_libdir} being the same

${libdir} and ${base_libdir} may be the same. If they are don't try and
move files onto themselves.

Signed-off-by: Mike Crowe <mac at mcrowe.com>

---

 meta/recipes-support/libcap/libcap.inc |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc
index 9418abf..5b03671 100644
--- a/meta/recipes-support/libcap/libcap.inc
+++ b/meta/recipes-support/libcap/libcap.inc
@@ -12,6 +12,8 @@ DEPENDS_virtclass-native = "perl-native-runtime"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/libcap2/${BPN}-${PV}.tar.bz2"
 
+PR = "r1"
+
 inherit lib_package
 
 do_configure() {
@@ -47,8 +49,10 @@ do_install() {
 do_install_append() {
 	# Move the library to base_libdir
 	install -d ${D}${base_libdir}
-	mv ${D}${libdir}/* ${D}${base_libdir}
-	rmdir ${D}${libdir}
+	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+		mv ${D}${libdir}/* ${D}${base_libdir}
+		rmdir ${D}${libdir}
+	fi
 }
 
 FILES_${PN}-dev += "${base_libdir}/*.so"





More information about the Openembedded-commits mailing list