Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Wed, 02 Jan 2013 00:30:37
Message-Id: 1357086485.63bf20d0925ca76c98477a108a6d4c3fa8fde885.zmedico@gentoo
1 commit: 63bf20d0925ca76c98477a108a6d4c3fa8fde885
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 1 14:15:39 2013 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 2 00:28:05 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=63bf20d0
7
8 repoman: tell user which mirror identifiers contain SRC_URI
9
10 before the patch:
11 $ repoman full
12
13 RepoMan scours the neighborhood...
14 metadata.missing 1
15 dev-haskell/qthaskellc/metadata.xml
16 SRC_URI.mirror 1
17 dev-haskell/qthaskellc/qthaskellc-1.1.4.ebuild: 'http://download.berlios.de/' found in thirdpartymirrors
18
19 after the patch:
20 $ repoman full
21
22 RepoMan scours the neighborhood...
23 metadata.missing 1
24 dev-haskell/qthaskellc/metadata.xml
25 SRC_URI.mirror 1
26 dev-haskell/qthaskellc/qthaskellc-1.1.4.ebuild: 'http://download.berlios.de/' found in thirdpartymirrors: 'mirror://berlios'
27
28 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
29
30 ---
31 bin/repoman | 12 ++++++------
32 1 files changed, 6 insertions(+), 6 deletions(-)
33
34 diff --git a/bin/repoman b/bin/repoman
35 index 45a7ca5..92ae667 100755
36 --- a/bin/repoman
37 +++ b/bin/repoman
38 @@ -1267,12 +1267,12 @@ check_ebuild_notadded = not \
39 (vcs == "svn" and repolevel < 3 and options.mode != "commit")
40
41 # Build a regex from thirdpartymirrors for the SRC_URI.mirror check.
42 -thirdpartymirrors = []
43 -for v in repoman_settings.thirdpartymirrors().values():
44 +thirdpartymirrors = {}
45 +for k, v in repoman_settings.thirdpartymirrors().items():
46 for v in v:
47 if not v.endswith("/"):
48 v += "/"
49 - thirdpartymirrors.append(v)
50 + thirdpartymirrors[v] = k
51
52 class _MetadataTreeBuilder(xml.etree.ElementTree.TreeBuilder):
53 """
54 @@ -1772,7 +1772,7 @@ for x in effective_scanlist:
55 for uri in portage.dep.use_reduce( \
56 myaux["SRC_URI"], matchall=True, is_src_uri=True, eapi=eapi, flat=True):
57 contains_mirror = False
58 - for mirror in thirdpartymirrors:
59 + for mirror, mirror_alias in thirdpartymirrors.items():
60 if uri.startswith(mirror):
61 contains_mirror = True
62 break
63 @@ -1781,8 +1781,8 @@ for x in effective_scanlist:
64
65 stats["SRC_URI.mirror"] += 1
66 fails["SRC_URI.mirror"].append(
67 - "%s: '%s' found in thirdpartymirrors" % \
68 - (relative_path, mirror))
69 + "%s: '%s' found in thirdpartymirrors: 'mirror://%s'" % \
70 + (relative_path, mirror, mirror_alias))
71
72 if myaux.get("PROVIDE"):
73 stats["virtual.oldstyle"]+=1