aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/justfile
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-22 10:41:22 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-22 10:41:22 +0100
commitdff883ec04c62dc4a111597aace1ce5972b7dc01 (patch)
tree9bed71adb64e8fb72834d5431101872f6b4ba69d /justfile
parent45dba9ed41116c9de6a4d68a6b7fb36067bf7c39 (diff)
downloaddotfiles-dff883ec04c62dc4a111597aace1ce5972b7dc01.tar.gz
dotfiles-dff883ec04c62dc4a111597aace1ce5972b7dc01.tar.bz2
dotfiles-dff883ec04c62dc4a111597aace1ce5972b7dc01.zip
refactor(pkg): drop provider-resolution fallback in mark_explicit
Now that meta/*.txt is conventionally required to list installed package names (not virtual providers — see preceding commit dropping ttf-font-awesome in favour of the already-declared otf-font-awesome), the intersection with pacman -Qq is unnecessary. Failing loudly on a virtual-provider entry is actually useful: it surfaces a data-entry mistake instead of silently masking it.
Diffstat (limited to 'justfile')
-rw-r--r--justfile13
1 files changed, 4 insertions, 9 deletions
diff --git a/justfile b/justfile
index e74740b..a1cb7b3 100644
--- a/justfile
+++ b/justfile
@@ -1073,15 +1073,10 @@ pkg-apply *groups:
mark_explicit() {
# Skip blank input; pacman -D errors on empty arg list.
[ -n "$1" ] || return 0
- # Intersect with the local DB: a declared name may have been
- # resolved by paru to a provider with a different package name
- # (e.g. ttf-font-awesome -> otf-font-awesome), in which case
- # `pacman -D --asexplicit <declared-name>` would error with
- # "could not find or read package".
- installed=$(printf '%s\n' "$1" | sort -u \
- | comm -12 - <(pacman -Qq | sort -u))
- [ -n "$installed" ] || return 0
- printf '%s\n' "$installed" | xargs sudo pacman -D --asexplicit >/dev/null
+ # Names in meta/*.txt must match the installed package name (not a
+ # virtual provider): if pacman -D fails with "could not find or
+ # read package", dedupe the offending entry against `pacman -Qq`.
+ printf '%s\n' "$1" | xargs sudo pacman -D --asexplicit >/dev/null
}
if [ -n "{{ groups }}" ]; then
for group in {{ groups }}; do