Comments
Patch
@@ -34,7 +34,7 @@ ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_LINKS = ""
# [ gets a special treatment and is not included in this
-bindir_progs = "base64 basename cksum comm csplit cut dir dircolors dirname du \
+bindir_progs = "basename cksum comm csplit cut dir dircolors dirname du \
env expand expr factor fmt fold groups head hostid id install \
join link logname md5sum mkfifo nice nl nohup od paste pathchk \
pinky pr printenv printf ptx readlink seq sha1sum sha224sum sha256sum \
@@ -43,7 +43,7 @@ bindir_progs = "base64 basename cksum comm csplit cut dir dircolors dirname du \
ALTERNATIVE_LINKS += "${bindir}/${@' ${bindir}/'.join((d.getVar('bindir_progs', True)).split())}"
# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
+base_bindir_progs = "base64 cat chgrp chmod chown cp date dd df echo false kill ln ls mkdir \
mknod mv pwd rm rmdir sleep stty sync touch true uname"
ALTERNATIVE_LINKS += "${base_bindir}/${@' ${base_bindir}/'.join((d.getVar('base_bindir_progs', True)).split())}"
@@ -69,12 +69,16 @@ do_install_append() {
# 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}
+
+ # remove su, it should come from shadow or another package
+ rm ${D}${bindir}/su
}
pkg_postinst_${PN} () {
- # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
+ # Special cases. uptime and hostname is broken, prefer busybox's version.
update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
+ # [ needs to be treated separately.
update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
}
@@ -24,7 +24,7 @@ EXTRA_OECONF_virtclass-native = "--without-gmp"
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_LINKS = ""
-# [ df mktemp base64 gets a special treatment and is not included in this
+# [ gets a special treatment and is not included in this
bindir_progs = "basename chcon cksum comm csplit cut dir dircolors dirname du \
env expand expr factor fmt fold groups head hostid id install \
join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
@@ -33,18 +33,14 @@ bindir_progs = "basename chcon cksum comm csplit cut dir dircolors dirname du \
tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
ALTERNATIVE_LINKS += "${bindir}/${@' ${bindir}/'.join((d.getVar('bindir_progs', True)).split())}"
-# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
- mknod mv pwd rm rmdir sleep stty sync touch true uname"
+base_bindir_progs = "base64 cat chgrp chmod chown cp date dd df echo false kill ln ls mkdir \
+ mknod mktemp mv pwd rm rmdir sleep stty sync touch true uname"
ALTERNATIVE_LINKS += "${base_bindir}/${@' ${base_bindir}/'.join((d.getVar('base_bindir_progs', True)).split())}"
sbindir_progs= "chroot"
ALTERNATIVE_LINKS += "${sbindir}/${@' ${sbindir}/'.join((d.getVar('sbindir_progs', True)).split())}"
# Manual file provides for manually controlled alternatives
-MANUAL_ALTERNATIVE_LINKS += "${base_bindir}/df:${bindir}/df.${PN}"
-MANUAL_ALTERNATIVE_LINKS += "${base_bindir}/mktemp:${bindir}/mktemp.${PN}"
-MANUAL_ALTERNATIVE_LINKS += "${base_bindir}/base64:${bindir}/base64.${PN}"
MANUAL_ALTERNATIVE_LINKS += "${bindir}/[:${bindir}/lbracket.${PN}"
do_install_append() {
@@ -54,9 +50,6 @@ do_install_append() {
install -d ${D}${sbindir}
for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i; done
- # Process the special items due to mismatch with busybox
- for i in df mktemp base64; 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.
@@ -69,21 +62,11 @@ do_install_append() {
pkg_postinst_${PN} () {
# Special cases. [ needs to be treated separately.
update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
-
- # Special cases. base64, mktemp and df need to be treated separately, because busybox have them in base_binding not bindir
- update-alternatives --install ${base_bindir}/base64 base64 ${bindir}/base64.${PN} 100;
- update-alternatives --install ${base_bindir}/mktemp mktemp ${bindir}/mktemp.${PN} 100;
- update-alternatives --install ${base_bindir}/df df ${bindir}/df.${PN} 100;
}
pkg_prerm_${PN} () {
# The special cases
- update-alternatives --remove hostname hostname.${PN}
- update-alternatives --remove uptime uptime.${PN}
update-alternatives --remove '[' 'lbracket.${PN}'
- update-alternatives --remove base64 ${bindir}/base64.${PN}
- update-alternatives --remove mktemp ${bindir}/mktemp.${PN}
- update-alternatives --remove df ${bindir}.df.${PN}
}
BBCLASSEXTEND = "native"