Browse Source

mktemp: Move installed files only when needed

Move binary(ies) only when ${base_bindir} != ${bindir}.

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

(From OE-Core rev: 3a571f24b183ba0bb0795b9df2b2c9bad331d715)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Amarnath Valluri 8 years ago
parent
commit
d582e406ba
1 changed files with 5 additions and 3 deletions
  1. 5 3
      meta/recipes-extended/mktemp/mktemp_1.7.bb

+ 5 - 3
meta/recipes-extended/mktemp/mktemp_1.7.bb

@@ -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"