Skip to content

Commit 3378ec5

Browse files
committed
Merge pull request #145 from AladW/patch-1
Use RPC v5
2 parents ed928f8 + 27cfade commit 3378ec5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packer

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ makepkgconf='/etc/makepkg.conf'
2424
usermakepkgconf="$HOME/.makepkg.conf"
2525
pacmanconf='/etc/pacman.conf'
2626

27-
RPCURL="https://aur.archlinux.org/rpc.php?type"
27+
RPCURL="https://aur.archlinux.org/rpc.php/rpc/?v=5&type"
2828
PKGURL="https://aur.archlinux.org"
2929
PKGBURL="https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h"
3030

@@ -236,7 +236,7 @@ rpcinfo() {
236236

237237
pkglink() {
238238
rpcinfo $1
239-
echo "${PKGURL}$(jshon -Q -e results -e URLPath -u < "$tmpdir/$1.info")"
239+
echo "${PKGURL}$(jshon -Q -e results -a -e URLPath -u < "$tmpdir/$1.info")"
240240
}
241241

242242
# downloads pkgbuild ($1), edits if $2 is set
@@ -257,7 +257,7 @@ aurversionisnewer() {
257257
rpcinfo "$1"
258258
unset aurversion
259259
if existsinaur "$1"; then
260-
aurversion="$(jshon -Q -e results -e Version -u < "$tmpdir/$1.info")"
260+
aurversion="$(jshon -Q -e results -a -e Version -u < "$tmpdir/$1.info")"
261261
if [[ "$(LC_ALL=C vercmp "$aurversion" "$2")" -gt 0 ]]; then
262262
return 0
263263
fi
@@ -267,7 +267,7 @@ aurversionisnewer() {
267267

268268
isoutofdate() {
269269
rpcinfo "$1"
270-
[[ "$(jshon -Q -e results -e OutOfDate -u < "$tmpdir/$1.info")" = "1" ]]
270+
[[ "$(jshon -Q -e results -a -e OutOfDate -u < "$tmpdir/$1.info")" = "1" ]]
271271
}
272272

273273
# $1 is prompt, $2 is file
@@ -469,7 +469,7 @@ installhandling() {
469469
}
470470

471471
run_quick_check() {
472-
bigurl="https://aur.archlinux.org/rpc.php?type=multiinfo"
472+
bigurl="https://aur.archlinux.org/rpc.php/rpc/?v=5&type=info"
473473
for p in $(pacman -Qqm); do
474474
bigurl="$bigurl&arg\[\]=$p"
475475
done

0 commit comments

Comments
 (0)