Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/scan/fetch/
Date: Thu, 06 Oct 2016 20:07:48
Message-Id: 1475784458.abf62a8889702c6fa42a30807636e119d7aa312b.mgorny@gentoo
1 commit: abf62a8889702c6fa42a30807636e119d7aa312b
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 6 08:32:13 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 6 20:07:38 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=abf62a88
7
8 repoman: Disable SRC_URI.mirror warnings when there is only 1 mirror
9
10 Disable SRC_URI.mirror warnings when the thirdpartymirrors entry
11 consists of no more than 1 mirror. In this case, the mirror:// is really
12 no different than direct URL, and it most likely means the entry is only
13 kept for backwards compatibility.
14
15 Closes: https://github.com/gentoo/portage/pull/58
16
17 repoman/pym/repoman/modules/scan/fetch/fetches.py | 6 ++++++
18 1 file changed, 6 insertions(+)
19
20 diff --git a/repoman/pym/repoman/modules/scan/fetch/fetches.py b/repoman/pym/repoman/modules/scan/fetch/fetches.py
21 index 555f34f..9ee3c65 100644
22 --- a/repoman/pym/repoman/modules/scan/fetch/fetches.py
23 +++ b/repoman/pym/repoman/modules/scan/fetch/fetches.py
24 @@ -36,6 +36,12 @@ class FetchChecks(ScanBase):
25 self.thirdpartymirrors = {}
26 profile_thirdpartymirrors = self.repo_settings.repoman_settings.thirdpartymirrors().items()
27 for mirror_alias, mirrors in profile_thirdpartymirrors:
28 + # Skip thirdpartymirrors that do not list more than one mirror
29 + # anymore. There is no point in using mirror:// there and this
30 + # means that the thirdpartymirrors entry will most likely
31 + # be removed anyway.
32 + if len(mirrors) <= 1:
33 + continue
34 for mirror in mirrors:
35 if not mirror.endswith("/"):
36 mirror += "/"