From: Mike Crowe Date: Thu, 5 Feb 2015 17:50:23 +0000 (+0000) Subject: sed: Cope with ${bindir} and ${base_bindir} being the same X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~31065 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab1452cacce6584bab27b73fc1e22d603606ecda;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git sed: Cope with ${bindir} and ${base_bindir} being the same ${bindir} and ${base_bindir} may be the same. If they are don't try and move files onto themselves. Signed-off-by: Mike Crowe Signed-off-by: Ross Burton --- diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb index 4c0f3452ac0..40e3a53ceb1 100644 --- a/meta/recipes-extended/sed/sed_4.1.2.bb +++ b/meta/recipes-extended/sed/sed_4.1.2.bb @@ -23,8 +23,10 @@ do_configure_prepend () { do_install () { autotools_do_install install -d ${D}${base_bindir} - mv ${D}${bindir}/sed ${D}${base_bindir}/sed - rmdir ${D}${bindir}/ + if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then + mv ${D}${bindir}/sed ${D}${base_bindir}/sed + rmdir ${D}${bindir}/ + fi } ALTERNATIVE_${PN} = "sed" diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb index 72976deb645..bbfa238df18 100644 --- a/meta/recipes-extended/sed/sed_4.2.2.bb +++ b/meta/recipes-extended/sed/sed_4.2.2.bb @@ -22,8 +22,10 @@ EXTRA_OECONF = "--disable-acl \ do_install () { autotools_do_install install -d ${D}${base_bindir} - mv ${D}${bindir}/sed ${D}${base_bindir}/sed - rmdir ${D}${bindir}/ + if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then + mv ${D}${bindir}/sed ${D}${base_bindir}/sed + rmdir ${D}${bindir}/ + fi } ALTERNATIVE_${PN} = "sed"