diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-11-27 02:53:36 -0500 |
---|---|---|
committer | Chen Qi <Qi.Chen@windriver.com> | 2014-12-19 17:05:19 +0800 |
commit | bce5d25923fa12b78995d41278ed940869221feb (patch) | |
tree | b58dda449c121b50c2cfd4f8efcda2adaebab85e | |
parent | 14030a101df4c3eddbd3f7606b6d8835ab2c6110 (diff) | |
download | openembedded-core-contrib-bce5d25923fa12b78995d41278ed940869221feb.tar.gz |
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.bb | 6 | ||||
-rw-r--r-- | meta/recipes-extended/sed/sed_4.2.2.bb | 6 |
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" |