| git.druid.rocks | index | druid520 | ports | ports/ | coreutils/ | busybox/ | del.sh |
ports/coreutils/busybox/del.sh
set -e
# unlike a normal package, this one does NOT run its own uninstall
# machinery (kbuild's "uninstall" target, or applets/install.sh) at all
# - even fully neutralizing the one "rm -f bin/busybox" line (as an
# earlier version of this file did) isn't enough: the SAME uninstall
# loop that removes every applet symlink is itself running under /bin/sh
# and calling /bin/rm, BOTH of which are busybox symlinks the loop
# itself deletes partway through, breaking every rm invocation still
# left in that same loop for the rest of its run - not a hypothetical,
# reproduced for real (the chroot needed hand recovery, re-symlinking
# every missing applet from busybox.links, to become usable again).
# there is no fully safe way to have busybox remove its own files using
# only busybox-provided tools, the same fundamental problem already hit
# and fixed the same way for libcs/musl's own libc.so/shell dependency.
#
# add.sh's own fresh "gmake install" already overwrites/recreates
# whatever needs it (and, per applets/install.sh's own -e/-h noclobber
# check, leaves already-correct symlinks alone) on the very next
# install, so nothing here needs deleting first.
rm -rf busybox