summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-08 00:25:56 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-08 00:25:56 +0000
commitc42859a41e6b2b6585ac7bd98e03e6529a118a01 (patch)
treecbe87ffa82ccae9959a2d7c96ec560b5681c25bf /bin
parentdc6f1843c745950b91a9bb64f5668de24f4cd08d (diff)
downloadportage-c42859a41e6b2b6585ac7bd98e03e6529a118a01.tar.gz
portage-c42859a41e6b2b6585ac7bd98e03e6529a118a01.tar.bz2
portage-c42859a41e6b2b6585ac7bd98e03e6529a118a01.zip
Use plain sequential search for the SRC_URI.mirror check since the regex
approach is actually much slower. svn path=/main/trunk/; revision=10977
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman13
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/repoman b/bin/repoman
index 508b91b2b..2c34ac919 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -780,8 +780,6 @@ check_ebuild_notadded = not \
# Build a regex from thirdpartymirrors for the SRC_URI.mirror check.
thirdpartymirrors = portage.flatten(repoman_settings.thirdpartymirrors().values())
-thirdpartymirrors = re.compile(r'^(%s)' % \
- "|".join(re.escape(x) for x in thirdpartymirrors))
for x in scanlist:
#ebuilds and digests added to cvs respectively.
@@ -1109,13 +1107,18 @@ for x in scanlist:
# Check that URIs don't reference a server from thirdpartymirrors.
for uri in portage.flatten(portage.dep.use_reduce(
portage.dep.paren_reduce(myaux["SRC_URI"]), matchall=True)):
- m = thirdpartymirrors.match(uri)
- if m is None:
+ contains_mirror = False
+ for mirror in thirdpartymirrors:
+ if uri.startswith(mirror):
+ contains_mirror = True
+ break
+ if not contains_mirror:
continue
+
stats["SRC_URI.mirror"] += 1
fails["SRC_URI.mirror"].append(
"%s: '%s' found in thirdpartymirrors" % \
- (relative_path, m.group(0)))
+ (relative_path, mirror))
# Test for negative logic and bad words in the RESTRICT var.
#for x in myaux[allvars.index("RESTRICT")].split():