From 2c7149633731272df5323dd0bd5165a67b0eb2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominic=20Sacr=C3=A9?= Date: Thu, 17 Sep 2015 18:13:42 +0200 Subject: tar: fix install if bindir == base_bindir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't try to move binaries onto themselves if ${bindir} and ${base_bindir} are the same, as is the case on systems with a merged /usr directory. Signed-off-by: Dominic Sacré Signed-off-by: Ross Burton --- meta/recipes-extended/tar/tar.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc index b339c43385..93e4da114b 100644 --- a/meta/recipes-extended/tar/tar.inc +++ b/meta/recipes-extended/tar/tar.inc @@ -22,10 +22,12 @@ do_install () { } do_install_append_class-target() { - install -d ${D}${base_bindir} - mv ${D}${bindir}/tar ${D}${base_bindir}/tar - mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar - rmdir ${D}${bindir}/ + if [ "${base_bindir}" != "${bindir}" ]; then + install -d ${D}${base_bindir} + mv ${D}${bindir}/tar ${D}${base_bindir}/tar + mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar + rmdir ${D}${bindir}/ + fi } PACKAGES =+ "${PN}-rmt" -- cgit v1.2.3