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
commitcf98e69d76cd952b2fd58fc9f77e46826ac941d0 (patch)
treeae7423a6d669b2834444783547992dfb6b98d291 /justfile
parentb7b2f2d54261cc77be3658463d58b621ae29e1e6 (diff)
downloaddotfiles-cf98e69d76cd952b2fd58fc9f77e46826ac941d0.tar.gz
dotfiles-cf98e69d76cd952b2fd58fc9f77e46826ac941d0.tar.bz2
dotfiles-cf98e69d76cd952b2fd58fc9f77e46826ac941d0.zip
fix(pkg): skip mark-explicit for packages resolved to a different provider
paru may resolve a declared name to a provider with a different package name (e.g. ttf-font-awesome -> otf-font-awesome). Calling `pacman -D --asexplicit` on the declared name then fails with 'could not find or read package' and aborts the recipe. Intersect the declared list with `pacman -Qq` before bumping reasons; names not present in the local DB are silently skipped.
Diffstat (limited to 'justfile')
-rw-r--r--justfile10
1 files changed, 9 insertions, 1 deletions
diff --git a/justfile b/justfile
index d9b9699..e74740b 100644
--- a/justfile
+++ b/justfile
@@ -1073,7 +1073,15 @@ pkg-apply *groups:
mark_explicit() {
# Skip blank input; pacman -D errors on empty arg list.
[ -n "$1" ] || return 0
- printf '%s\n' "$1" | xargs sudo pacman -D --asexplicit >/dev/null
+ # 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
}
if [ -n "{{ groups }}" ]; then
for group in {{ groups }}; do