handlers/rubygems: stop using mirrors
* https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65850a10f84e1b7a2cdf55392fa1d1f0717193c1 Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
parent
656f8e155e
commit
5da26b0719
@ -51,7 +51,7 @@ BLACKLIST_PACKAGES = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
SCANDIR_BLACKLIST_URLS = [
|
SCANDIR_BLACKLIST_URLS = [
|
||||||
"mirror://rubygems/(.*)", # Not browsable
|
"https://rubygems.org/(.*)", # Not browsable
|
||||||
"mirror://gentoo/(.*)", # Directory too big
|
"mirror://gentoo/(.*)", # Directory too big
|
||||||
"https://dev.gentoo.org/(.*)", # There shouldn't be releases here
|
"https://dev.gentoo.org/(.*)", # There shouldn't be releases here
|
||||||
# Waste of time to go through
|
# Waste of time to go through
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Copyright 2011 Corentin Chary <corentin.chary@gmail.com>
|
# Copyright 2011 Corentin Chary <corentin.chary@gmail.com>
|
||||||
# Copyright 2020-2023 src_prepare group
|
# Copyright 2020-2024 src_prepare group
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
import json
|
import json
|
||||||
@ -18,11 +18,11 @@ PRIORITY = 90
|
|||||||
|
|
||||||
|
|
||||||
def can_handle(pkg, url=None):
|
def can_handle(pkg, url=None):
|
||||||
return url and url.startswith("mirror://rubygems/")
|
return url and url.startswith("https://rubygems.org/")
|
||||||
|
|
||||||
|
|
||||||
def guess_gem(cpv, url):
|
def guess_gem(cpv, url):
|
||||||
match = re.search("mirror://rubygems/(.*).gem", url)
|
match = re.search("https://rubygems.org/gems/(.*).gem", url)
|
||||||
if match:
|
if match:
|
||||||
cpv = "fake/%s" % match.group(1)
|
cpv = "fake/%s" % match.group(1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user