aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2010-10-30 15:11:26 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2010-10-30 16:02:00 +0200
commit05794e79b4af2d2f3ded69a02c0275335b75a47c (patch)
tree51680e81aea07e69660e8746f5d843781841ff40
parent931fb39f49cc32a1fdc87ed934e5d8fda6749f22 (diff)
downloadopenembedded-05794e79b4af2d2f3ded69a02c0275335b75a47c.tar.gz
openembedded-05794e79b4af2d2f3ded69a02c0275335b75a47c.tar.bz2
openembedded-05794e79b4af2d2f3ded69a02c0275335b75a47c.zip
coreutils: use u-a for sha256sum, sha512sum, timeout (conflict with busybox-1.17.3)
* surround "u-a --install" and "mv" calls with "if" to be sure it won't fail for old coreutils version without some ${bindir}/$i Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes/coreutils/coreutils-target.inc38
1 files changed, 31 insertions, 7 deletions
diff --git a/recipes/coreutils/coreutils-target.inc b/recipes/coreutils/coreutils-target.inc
index 1dd1d369f3..27d17a9446 100644
--- a/recipes/coreutils/coreutils-target.inc
+++ b/recipes/coreutils/coreutils-target.inc
@@ -7,7 +7,7 @@ bindir_progs = "basename cksum comm csplit cut df dir dircolors dirname du \
join link logname md5sum mkfifo nice nl nohup od paste pathchk \
pinky pr printenv printf ptx readlink seq sha1sum shred sort \
split stat sum tac tail tee test tr tsort tty unexpand uniq \
- unlink users vdir wc who whoami yes \
+ unlink users vdir wc who whoami yes sha256sum sha512sum timeout \
"
# hostname gets a special treatment and is not included in this
@@ -26,15 +26,27 @@ do_install () {
autotools_do_install
# Renaming the utilities that should go in /usr/bin
- for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
+ for i in ${bindir_progs}; do
+ if [ -e ${D}${bindir}/$i ]; then
+ mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN};
+ fi
+ done
# Renaming and moving the utilities that should go in /bin (FHS)
install -d ${D}${base_bindir}
- for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
+ for i in ${base_bindir_progs}; do
+ if [ -e ${D}${bindir}/$i ]; then
+ mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN};
+ fi
+ done
# Renaming and moving the utilities that should go in /usr/sbin (FHS)
install -d ${D}${sbindir}
- for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
+ for i in ${sbindir_progs}; do
+ if [ -e ${D}${bindir}/$i ]; then
+ mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN};
+ fi
+ done
# [ requires special handling because [.coreutils will cause the sed stuff
# in update-alternatives to fail, therefore use lbracket - the name used
@@ -51,13 +63,25 @@ do_install () {
pkg_postinst_${PN} () {
# The utilities in /usr/bin
- for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
+ for i in ${bindir_progs}; do
+ if [ -e ${bindir}/$i.${PN} ]; then
+ update-alternatives --install ${bindir}/$i $i $i.${PN} 100;
+ fi
+ done
# The utilities in /bin
- for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
+ for i in ${base_bindir_progs}; do
+ if [ -e ${base_bindir}/$i.${PN} ]; then
+ update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100;
+ fi
+ done
# The utilities in /usr/sbin
- for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
+ for i in ${sbindir_progs}; do
+ if [ -e ${sbindir}/$i.${PN} ]; then
+ update-alternatives --install ${sbindir}/$i $i $i.${PN} 100;
+ fi
+ done
# Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10