]> code.ossystems Code Review - openembedded-core.git/commitdiff
libcap: Cope with ${libdir} and ${base_libdir} being the same
authorMike Crowe <mac@mcrowe.com>
Mon, 6 Feb 2012 13:34:22 +0000 (13:34 +0000)
committerSaul Wold <sgw@linux.intel.com>
Tue, 7 Feb 2012 22:37:13 +0000 (14:37 -0800)
${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@mcrowe.com>
meta/recipes-support/libcap/libcap.inc

index 9418abf1e29dfb4c4ef17868006c1740eca9084f..5b03671de8372307f25e8d61b8899951f10fde5a 100644 (file)
@@ -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"