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>
This commit is contained in:
Amarnath Valluri authored and Richard Purdie committed 2017-03-22 11:35:20 +00:00
1 parent 8c13f318ae
commit d582e406ba
1 file changed
+5 -3
+5 -3
View 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"