1 |
commit: 7caac017833b01e13028658effc502430c56d770 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 3 18:53:47 2020 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 3 18:58:04 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=7caac017 |
7 |
|
8 |
main.py: Add a -a, -s combo sanity check |
9 |
|
10 |
This is to prevent all mirrors from being added to make.conf when the |
11 |
-s option is also enabled. The -a option takes priority in the code, so |
12 |
there is never any selection done. This options check will error out when |
13 |
both options are enabled. |
14 |
|
15 |
Reported by: toralf on #gentoo-dev |
16 |
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org> |
17 |
|
18 |
mirrorselect/main.py | 3 +++ |
19 |
1 file changed, 3 insertions(+) |
20 |
|
21 |
diff --git a/mirrorselect/main.py b/mirrorselect/main.py |
22 |
index b49461b..c4f649f 100755 |
23 |
--- a/mirrorselect/main.py |
24 |
+++ b/mirrorselect/main.py |
25 |
@@ -271,6 +271,9 @@ class MirrorSelect(object): |
26 |
if options.rsync and not (options.interactive or options.all_mirrors): |
27 |
self.output.print_err('rsync servers can only be selected with -i or -a') |
28 |
|
29 |
+ if options.servers and options.all_mirrors: |
30 |
+ self.output.print_err('Choose at most one of -s or -a') |
31 |
+ |
32 |
if options.interactive and ( |
33 |
options.deep or |
34 |
options.blocksize or |