[PATCH 21/23] mktemp: Move installed files only when needed

Amarnath Valluri
2017-02-10T13:42:52Z

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

When usrmerge distro feature is enabled they both might point to same location.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/recipes-extended/mktemp/mktemp_1.7.bb | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/mktemp/mktemp_1.7.bb b/meta/recipes-extended/mktemp/mktemp_1.7.bb
index 9accc6e..e8ae5c6 100644
--- a/meta/recipes-extended/mktemp/mktemp_1.7.bb
+++ b/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"
--
2.7.4