summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOyvind Repvik <nail@nslu2-linux.org>2005-08-05 03:11:13 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-08-05 03:11:13 +0000
commite790bee4030cd69ebd4c4aa9d33c79c89bbdceee (patch)
tree85f197b1b5813511cf58f9fda58021e69ac3a7c6
parent67e23dee34d2c486fd01ffc21c44cbd1f358f8d1 (diff)
Sort the special cases into a group, makes it easier to read. Remove duplicate removal of hostname
-rw-r--r--packages/coreutils/coreutils_5.1.3.bb34
1 files changed, 18 insertions, 16 deletions
diff --git a/packages/coreutils/coreutils_5.1.3.bb b/packages/coreutils/coreutils_5.1.3.bb
index 216fe24adc..31af80907d 100644
--- a/packages/coreutils/coreutils_5.1.3.bb
+++ b/packages/coreutils/coreutils_5.1.3.bb
@@ -3,7 +3,7 @@ SECTION = "base"
DESCRIPTION = "A collection of core GNU utilities."
RREPLACES = "textutils shellutils fileutils"
RPROVIDES = "textutils shellutils fileutils"
-PR = "r6"
+PR = "r7"
SRC_URI = "ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \
file://install-cross.patch;patch=1;pnum=0 \
@@ -33,51 +33,53 @@ 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
- # [ requires special handling because [.coreutils will cause the sed stuff
- # in update-alternatives to fail, therefore use lbracket - the name used
- # for the actual source file.
- mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
# 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
- mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
- mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
# 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
+
+ # [ requires special handling because [.coreutils will cause the sed stuff
+ # in update-alternatives to fail, therefore use lbracket - the name used
+ # for the actual source file.
+ mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
+ # hostname and uptime separated. busybox's versions are preferred
+ mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
+ mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
+
}
pkg_postinst_${PN} () {
# The utilities in /usr/bin
for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
- update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
- # coreutils uptime is broken but busybox uptime works, put at priority 10
- update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
# The utilities in /bin
for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
- # coreutils hostname is retarded and doesn't know about -F, put at priority 10
- update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
# The utilities in /usr/sbin
for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; 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
+ update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
+ update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
}
pkg_prerm_${PN} () {
# The utilities in /usr/bin
for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
- update-alternatives --remove '[' 'lbracket.${PN}'
# The utilities in /bin
for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
- update-alternatives --remove hostname hostname.${PN}
# The utilities in /usr/sbin
for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
# The special cases
- update-alternatives --remove ${bindir}/hostname hostname.${PN}
- update-alternatives --remove ${bindir}/uptime uptime.${PN}
+ update-alternatives --remove hostname hostname.${PN}
+ update-alternatives --remove uptime uptime.${PN}
+ update-alternatives --remove '[' 'lbracket.${PN}'
}