From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mail.openembedded.org (Postfix) with ESMTP id C7CD871979 for ; Fri, 10 Feb 2017 13:42:52 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 10 Feb 2017 05:42:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,141,1484035200"; d="scan'208";a="42543654" Received: from avallurigigabyte.fi.intel.com ([10.237.72.170]) by orsmga002.jf.intel.com with ESMTP; 10 Feb 2017 05:42:52 -0800 From: Amarnath Valluri To: openembedded-core@lists.openembedded.org Date: Fri, 10 Feb 2017 15:42:29 +0200 Message-Id: <1486734151-28331-22-git-send-email-amarnath.valluri@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486734151-28331-1-git-send-email-amarnath.valluri@intel.com> References: <1486734151-28331-1-git-send-email-amarnath.valluri@intel.com> Subject: [PATCH 21/23] mktemp: Move installed files only when needed X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 13:42:52 -0000 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 --- 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