From 2d3abfdc8bb035f4ae0b652c1362c68ca10e76e2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 15 Jul 2018 21:58:54 -0400 Subject: db-move, db-remove: Also accept pkgname, not just pkgbase! --- db-functions | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/db-functions b/db-functions index 52c3e45..6356792 100644 --- a/db-functions +++ b/db-functions @@ -457,22 +457,18 @@ arch_expac() { expac --config="${dir}/pacman.conf" --sync "${args[@]}" } -# usage: arch_expac_pkgbase repo arch format pkgbase -# Like arch_expac, but 'target' is a pkgbase rather than a pkgname. +# usage: arch_expac_pkgbase repo arch format +# Like arch_expac, but 'target' may be a pkgbase, instead of the usual +# pkgname. # Only accepts one target. arch_expac_pkgbase() { local repo=$1 local arch=$2 local format=$3 local pkgbase=$4 - # makepkg <5.1 didn't set pkgbase in .PKGINFO for non-split - # packages when when pkgbase==pkgname; so until all packages - # have been rebuilt with makepkg 5.1, we need to look at - # pkgbase (%e) and pkgname (%n) when filtering based on - # pkgbase. arch_expac "$repo" "$arch" "%e %n $format" | awk -F' ' -v pkgbase="$pkgbase" \ - '$1 == pkgbase || ($1 == "(null)" && $2 == pkgbase)' | + '$1 == pkgbase || $2 == pkgbase' | cut -d' ' -f3- } -- cgit v1.2.2