diff options
Diffstat (limited to 'docs/superpowers/plans')
| -rw-r--r-- | docs/superpowers/plans/2026-09-17-network-slackware-widgets.md | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/superpowers/plans/2026-09-17-network-slackware-widgets.md b/docs/superpowers/plans/2026-09-17-network-slackware-widgets.md index aadc5a4..826bcfa 100644 --- a/docs/superpowers/plans/2026-09-17-network-slackware-widgets.md +++ b/docs/superpowers/plans/2026-09-17-network-slackware-widgets.md @@ -1261,10 +1261,15 @@ trap 'rm -f "$TMP"' EXIT VERSION=$(cat /etc/slackware-version 2>/dev/null || echo unknown) -# The TRAILING SLASH is load-bearing. /var/log/packages is a symlink to -# /var/lib/pkgtools/packages, and `ls -1 /var/log/packages` lists the link -# itself: one entry. With the slash it lists the target's contents, which on -# this machine is some 2800 packages. Do not remove it as cosmetic. +# /var/log/packages is a symlink to /var/lib/pkgtools/packages. GNU ls follows +# it either way, so the trailing slash is belt and braces rather than the load +# bearing part; what would break this is adding -d, which lists the link itself +# and reports one package. +# +# The real trap is `ls` being aliased: the user's shell aliases it to `ls -lh`, +# and a long-format listing counts a "total" header line as a package. This +# script is not interactive so aliases do not apply, but do not move this +# counting into anything that is. PACKAGES=$(ls -1 /var/log/packages/ 2>/dev/null | wc -l) # Epochs, never formatted dates. The shell function this replaces rebuilds a |
