fixing URLs for ABS after upstream change from git.archlinux.org to github

This commit is contained in:
Oliver Mangold 2021-07-09 10:20:51 +02:00 committed by J Guerreiro
parent 61e38ad2fc
commit 4a9319920b
3 changed files with 6 additions and 6 deletions

View File

@ -252,9 +252,9 @@ func getPkgbuildsfromABS(pkgs []string, path string, dbExecutor db.Executor, for
// https://git.archlinux.org/svntogit/packages.git
switch pkg.DB().Name() {
case "core", "extra", "testing":
url = "https://git.archlinux.org/svntogit/packages.git"
url = "https://github.com/archlinux/svntogit-packages.git"
case "community", "multilib", "community-testing", "multilib-testing":
url = "https://git.archlinux.org/svntogit/community.git"
url = "https://github.com/archlinux/svntogit-community.git"
default:
missing = append(missing, name)
continue

View File

@ -15,8 +15,8 @@ var ErrABSPackageNotFound = errors.New(gotext.Get("package not found in repos"))
const MaxConcurrentFetch = 20
const urlPackagePath = "/plain/trunk/PKGBUILD?"
var ABSPackageURL = "https://git.archlinux.org/svntogit/packages.git"
var ABSCommunityURL = "https://git.archlinux.org/svntogit/community.git"
var ABSPackageURL = "https://github.com/archlinux/svntogit-packages.git"
var ABSCommunityURL = "https://github.com/archlinux/svntogit-community.git"
func getPackageURL(db, pkgName string) (string, error) {
values := url.Values{}

View File

@ -46,7 +46,7 @@ func Test_getPackageURL(t *testing.T) {
db: "community",
pkgName: "kitty",
},
want: "https://git.archlinux.org/svntogit/community.git/plain/trunk/PKGBUILD?h=packages%2Fkitty",
want: "https://github.com/archlinux/svntogit-community.git/plain/trunk/PKGBUILD?h=packages%2Fkitty",
wantErr: false,
},
{
@ -55,7 +55,7 @@ func Test_getPackageURL(t *testing.T) {
db: "core",
pkgName: "linux",
},
want: "https://git.archlinux.org/svntogit/packages.git/plain/trunk/PKGBUILD?h=packages%2Flinux",
want: "https://github.com/archlinux/svntogit-packages.git/plain/trunk/PKGBUILD?h=packages%2Flinux",
wantErr: false,
},
{