]> code.ossystems Code Review - openembedded-core.git/commitdiff
mktemp: Move installed files only when needed
authorAmarnath Valluri <amarnath.valluri@intel.com>
Wed, 8 Feb 2017 09:15:17 +0000 (11:15 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 21 Mar 2017 22:43:01 +0000 (22:43 +0000)
Move binary(ies) only when ${base_bindir} != ${bindir}.

When usrmerge is enabled they both can point to same location.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
meta/recipes-extended/mktemp/mktemp_1.7.bb

index 9accc6eed69647600060d89418821eb971e04c27..e8ae5c6b724a16003275a1ca7a4bf9c9a1c96c2d 100644 (file)
@@ -20,9 +20,11 @@ inherit autotools update-alternatives
 EXTRA_OECONF = "--with-libc"
 
 do_install_append () {
-       install -d ${D}${base_bindir}
-       mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp
-       rmdir ${D}${bindir}
+       if [ "${base_bindir}" != "${bindir}" ] ; then
+               install -d ${D}${base_bindir}
+               mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp
+               rmdir ${D}${bindir}
+       fi
 }
 
 ALTERNATIVE_${PN} = "mktemp"