From 970f10dfaab3a3f0d1759e016408ec3b1cc0ac5f Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Wed, 29 Apr 2020 17:36:39 +0200 Subject: clean-spec: change cpan.org to metacpan.org --- mgagnome | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/mgagnome b/mgagnome index a4b5dfa..5e04866 100755 --- a/mgagnome +++ b/mgagnome @@ -488,8 +488,26 @@ class SpecFile(): ( 'download.gnome.org instead of ftp.gnome.org', r'\ghttps://download.gnome.org\g', - re.compile(r'^(?PSource[0-9]*[ \t]*:[^\n]+)(?:ftp|http|https):' + - r'//ftp.gnome.org/pub/GNOME(?P/[^\n]+\n)', + re.compile(r'^(?PSource[0-9]*[ \t]*:[^\n]+)' + r'(?:ftp|http|https)://ftp.gnome.org/pub/GNOME' + r'(?P/[^\n]+\n)', + re.MULTILINE + re.IGNORECASE) + ), + ( + 'metacpan.org instead of www.cpan.org and search.cpan.org', + r'\ghttps://metacpan.org/release/\g\g', + re.compile(r'^(?PURL[ \t]*:[^\n]+)' + r'http://(?:search\.cpan\.org)/(?:dist|~[^/]+)/(?P[^/\n]+)/?[ \t]*' + r'(?P[^\n]*\n)', + re.MULTILINE + re.IGNORECASE) + ), + ( + 'metacpan.org instead of www.cpan.org and search.cpan.org', + r'\ghttps://cpan.metacpan.org/\g\g', + re.compile(r'^(?PSource[0-9]*[ \t]*:[^\n]+)' + r'https?://(?:(?:www\.cpan\.org)(?:/CPAN)?|(?:(?i)search\.cpan\.org)/CPAN)/+' + r'(?Pauthors/id/|modules/by-module/|modules/by-authors/id/)' + r'(?P[^\n]+\n)', re.MULTILINE + re.IGNORECASE) ), ( @@ -1160,7 +1178,12 @@ class Upstream(): if self.limit is not None: tarballs.intersection_update(self.limit) - self.names = tarballs + self._names = tarballs + + @property + def names(self): + """Return the upstream names""" + return self._names @classmethod @lru_cache(maxsize=4096) -- cgit v1.2.1