do not edit — generated by btf.
git.druid.rocksindexdruid520portsports/libcs/musl/del.sh

ports/libcs/musl/del.sh


set -e
 
# unlike every other del.sh in this tree, this one does NOT proactively
# remove musl's own installed files (headers, libc.so/.a, the lib*.a
# stubs) via the usual "DESTDIR-diff, then rm -f each file" approach.
#
# musl's own libc.so is the ELF interpreter every dynamically-linked
# binary on a musl system runs against - including /bin/sh itself, and
# whatever shell is running THIS SCRIPT. unlinking it partway through a
# removal loop breaks every subsequent command in that same script (an
# ELF's PT_INTERP path has to exist at exec() time for a NEW process to
# start at all, even though a process already running survives its own
# shared library disappearing from the filesystem) - trying the normal
# approach here once actually did exactly this, requiring hand recovery
# (copying a known-good libc.so back from the build's own staging
# checkout) to get a musl-based chroot running again at all. reordering
# the removal loop to delete libc.so last doesn't fully fix it either:
# every command AFTER the loop (gmake clean, and whatever comes next in
# an update's paired reinstall) still needs a working interpreter too.
#
# add.sh's own fresh "./configure && gmake && gmake install" overwrites
# every one of musl's files in place regardless, so nothing here actually
# needs deleting first - musl's file set (a fixed set of standard headers
# and the libc/lib*.a names) is stable across versions, unlike most
# packages where an old version's now-orphaned files genuinely need
# cleaning up before a differently-named new set lands.
rm -rf musl
powered by btf.