Closed helixarch closed 9 years ago
there's fledgling support- you can change the URL's used in /etc/apacman.conf
RPCURL="https://aur.archlinux.org/rpc.php?type" PKGURL="https://aur.archlinux.org"
These can be set to aur4. HOWEVER, the compatibility fails as the output differs slightly. e.g.: AUR3 (https://aur.archlinux.org/rpc.php?type=info&arg=dumpet):
{"version":1,"type":"info","resultcount":1,"results":{"ID":79002,"Name":"dumpet","PackageBaseID":79002,"PackageBase":"dumpet","Version":"2.1-2","CategoryID":16,"Description":"A tool for debugging El Torito boot images.","URL":"https:\/\/fedorahosted.org\/dumpet\/","NumVotes":1,"OutOfDate":0,"Maintainer":"sanerb","FirstSubmitted":1392392790,"LastModified":1392392994,"License":"GPL2","URLPath":"\/packages\/du\/dumpet\/dumpet.tar.gz"}}
AUR4 (https://aur.archlinux.org/rpc.php?type=info&arg=dumpet):
{"version":1,"type":"info","resultcount":1,"results":{"ID":184267,"Name":"dumpet","PackageBaseID":79002,"PackageBase":"dumpet","Version":"2.1-2","Description":"A tool for debugging El Torito boot images.","URL":"https:\/\/fedorahosted.org\/dumpet\/","NumVotes":1,"OutOfDate":0,"Maintainer":"sanerb","FirstSubmitted":1392392790,"LastModified":1433780379,"License":"GPL2","URLPath":"\/cgit\/aur.git\/snapshot\/dumpet.tar.gz","CategoryID":1,"Popularity":0}}
Here's what the diff looks like (piped through jshon):
6c6
< "ID": 79002,
---
> "ID": 184267,
11d10
< "CategoryID": 16,
18c17
< "LastModified": 1392392994,
---
> "LastModified": 1433780379,
20c19,21
< "URLPath": "\/packages\/du\/dumpet\/dumpet.tar.gz"
---
> "URLPath": "\/cgit\/aur.git\/snapshot\/dumpet.tar.gz",
> "CategoryID": 1,
> "Popularity": 0
@oshazard what kind of changes need to be made to the parsing for this?
untested, but tada:
diff --git a/apacman b/apacman
index 703a1d7..73a3261 100755
--- a/apacman
+++ b/apacman
@@ -408,7 +408,7 @@ abslink() {
pkginfo() {
if ! [[ -f "$tmpdir/$1.PKGBUILD" ]]; then
pkgpath=$(pkglink $1)
- curl -Lfs "${pkgpath%/*}/PKGBUILD" > "$tmpdir/$1.PKGBUILD"
+ curl -Lfs "${pkgpath%/*/*}/plain/PKGBUILD?h=${1}" > "$tmpdir/$1.PKGBUILD"
if [[ $2 ]]; then
# rename for syntax highlighting
cp "$tmpdir/$1.PKGBUILD" "$tmpdir/PKGBUILD"
diff --git a/apacman.conf b/apacman.conf
index 1f7f272..6d1e235 100644
--- a/apacman.conf
+++ b/apacman.conf
@@ -36,8 +36,8 @@
#downdir="/var/cache/pacman/pkg"
#savedir="/var/cache/apacman/pkg"
#editor="nano -w"
-#RPCURL="https://aur.archlinux.org/rpc.php?type"
-#PKGURL="https://aur.archlinux.org"
+#RPCURL="https://aur4.archlinux.org/rpc.php?type"
+#PKGURL="https://aur4.archlinux.org"
#ABSURL="rsync.archlinux.org"
#
someone want to test those changes for me? tested, seems to do the trick.
EDIT: i am a gorram silly ninny. the issue i mention below? yeah. uh, i missed a slash in the PKGBUILD url. lolz. it's late.
@oshazard i'll create a PR for this.
Thank you @bts368 . Merged. I have a couple more changes to make and still need to migrate my packages to AUR4
Wrote this quickly to migrate packages, might be useful for someone else: https://gist.github.com/oshazard/370c7ed631af2181ee51
ATTN: @helixarch @bts368
It needs AUR 4 support