kiss-orphans: Performance fixes. More to come
This commit is contained in:
parent
7bc3a0eb92
commit
466706f7c5
|
@ -1,17 +1,15 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
# List orphaned packages
|
# List orphaned packages
|
||||||
|
|
||||||
cd "$KISS_ROOT/var/db/kiss/installed/"
|
cd "$KISS_ROOT/var/db/kiss/installed"
|
||||||
set -- *
|
|
||||||
|
|
||||||
for pkg in *; do
|
# List of installed packages.
|
||||||
case $pkg in
|
printf -- '%s\n' * > "${TMPDIR:-/tmp}/packages"
|
||||||
# Exemptions for orphans which aren't really
|
|
||||||
# orphans. Exclude them from the list.
|
|
||||||
baseinit|baselayout|gcc|e2fsprogs|musl|\
|
|
||||||
make|busybox|bzip2|grub|kiss|git)
|
|
||||||
continue
|
|
||||||
esac
|
|
||||||
|
|
||||||
grep -q "^$pkg$" ./*/depends || printf '%s\n' "$pkg"
|
# List of runtime dependencies.
|
||||||
done
|
grep -hv ' make\|^#' ./*/depends | sort -u |
|
||||||
|
|
||||||
|
# Remove items in list 2 from list 1.
|
||||||
|
comm -23 "${TMPDIR:-/tmp}/packages" -
|
||||||
|
|
||||||
|
rm -f "${TMPDIR:-/tmp}/packages"
|
||||||
|
|
Loading…
Reference in New Issue