diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-07-15 21:58:54 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-07-16 10:10:20 -0400 |
commit | 2d3abfdc8bb035f4ae0b652c1362c68ca10e76e2 (patch) | |
tree | ac9174764cbc0503bdb6eca2cd37d86d047d3df1 | |
parent | a05a0ed7c6eb3ba42271987191d128024660f7f0 (diff) |
db-move, db-remove: Also accept pkgname, not just pkgbase!parabola/20180716
-rw-r--r-- | db-functions | 12 |
1 files 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 <pkgname|pkgbase> +# 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- } |