commit:     155056d851373a3415faedc6c00faae04e9b48b1
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 20 17:11:25 2015 +0000
Commit:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 20 17:11:29 2015 +0000
URL:        https://gitweb.gentoo.org/proj/layman.git/commit/?id=155056d8

reposconf.py: Adds proper disabling of overlays when option is "ALL"

X-Gentoo-Bug: 546852
X-Gentoo-Bug-URL: https://bugs.gentoo.org/546852

 layman/config_modules/reposconf/reposconf.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/layman/config_modules/reposconf/reposconf.py 
b/layman/config_modules/reposconf/reposconf.py
index a57c87e..1f0fd04 100644
--- a/layman/config_modules/reposconf/reposconf.py
+++ b/layman/config_modules/reposconf/reposconf.py
@@ -194,9 +194,11 @@ class ConfigHandler:
                     # start over with a fresh instance
                     self.repo_conf = ConfigParser.ConfigParser()
                 if not self.repo_conf.sections():
-                    for i in sorted(self.overlays):
-                        if not i == delete:
-                            self.add(self.overlays[i], no_write=True)
+                    if ('disable' in self.config.keys() and not
+                        self.config['disable'][0].lower() == 'all'):
+                        for i in sorted(self.overlays):
+                            if not i == delete:
+                                self.add(self.overlays[i], no_write=True)
                 self.repo_conf.write(laymanconf)
                 self.rebuild = False
             return True

Reply via email to