aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-11-27 02:53:36 -0500
committerChen Qi <Qi.Chen@windriver.com>2014-12-19 17:05:19 +0800
commitbce5d25923fa12b78995d41278ed940869221feb (patch)
treeb58dda449c121b50c2cfd4f8efcda2adaebab85e
parent14030a101df4c3eddbd3f7606b6d8835ab2c6110 (diff)
downloadopenembedded-core-contrib-bce5d25923fa12b78995d41278ed940869221feb.tar.gz
openembedded-core-contrib-bce5d25923fa12b78995d41278ed940869221feb.tar.bz2
openembedded-core-contrib-bce5d25923fa12b78995d41278ed940869221feb.zip
sed: test bindir and base_bindir before moving and removing things
It's possible that ${base_bindir} and ${bindir} point to the same directory. So we need to test it before moving things around or removing things. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r--meta/recipes-extended/sed/sed_4.1.2.bb6
-rw-r--r--meta/recipes-extended/sed/sed_4.2.2.bb6
2 files changed, 8 insertions, 4 deletions
diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb
index fe242e16bd..a2bcb7d75a 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 [ "${bindir}" != "${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 ea39dae435..1c49c12969 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 [ "${bindir}" != "${base_bindir}" ]; then
+ mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+ rmdir ${D}${bindir}/
+ fi
}
ALTERNATIVE_${PN} = "sed"