1 |
commit: 738c6f83b48c9f33ae17551b725756a1e94437fb |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 31 02:06:54 2022 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 31 02:22:29 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=738c6f83 |
7 |
|
8 |
main.py: Fix bug 600572 Remove SYNC variable usage |
9 |
|
10 |
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org> |
11 |
|
12 |
mirrorselect/main.py | 10 +++++----- |
13 |
1 file changed, 5 insertions(+), 5 deletions(-) |
14 |
|
15 |
diff --git a/mirrorselect/main.py b/mirrorselect/main.py |
16 |
index b0a68cc..9cad25b 100755 |
17 |
--- a/mirrorselect/main.py |
18 |
+++ b/mirrorselect/main.py |
19 |
@@ -343,12 +343,12 @@ class MirrorSelect(object): |
20 |
@rtype: string |
21 |
''' |
22 |
if rsync: |
23 |
- # startwith repos.conf |
24 |
+ # repos.conf |
25 |
config_path = EPREFIX + '/etc/portage/repos.conf/gentoo.conf' |
26 |
if not os.access(config_path, os.F_OK): |
27 |
self.output.write("Failed access to gentoo.conf: " |
28 |
"%s\n" % os.access(config_path, os.F_OK), 2) |
29 |
- return get_make_conf_path(EPREFIX) |
30 |
+ config_path = None |
31 |
return config_path |
32 |
return get_make_conf_path(EPREFIX) |
33 |
|
34 |
@@ -363,12 +363,12 @@ class MirrorSelect(object): |
35 |
self.output.verbosity = options.verbosity |
36 |
self.output.write("main(); config_path = %s\n" % config_path, 2) |
37 |
|
38 |
- # reset config_path to find repos.conf/gentoo.conf if it exists |
39 |
+ # reset config_path to find repos.conf/gentoo.conf |
40 |
if options.rsync: |
41 |
config_path = self.get_conf_path(options.rsync) |
42 |
self.output.write("main(); reset config_path = %s\n" % config_path, 2) |
43 |
- else: |
44 |
- self.output.write("main(); rsync = %s\n" % str(options.rsync),2) |
45 |
+ if not config_path: |
46 |
+ self.output.print_err("main(); Exiting due to missing repos.conf/gentoo.conf file\n") |
47 |
|
48 |
fsmirrors = get_filesystem_mirrors(self.output, |
49 |
config_path, options.rsync) |