public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/layman:master commit in: layman/config_modules/makeconf/
@ 2014-08-26 19:38 Devan Franchini
  0 siblings, 0 replies; 2+ messages in thread
From: Devan Franchini @ 2014-08-26 19:38 UTC (permalink / raw
  To: gentoo-commits

commit:     45c2514156d641c00b9bbefa8ac018d34b8c2024
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 25 00:34:19 2014 +0000
Commit:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Tue Aug 26 17:29:25 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=45c25141

makeconf.py: Ensures disable/enable compatibility

To reflect the ability to disable or enable an overlay, makeconf.py
needed to be able to go from the old style make.conf file to the
new style automatically when layman wrote to the make.conf.

---
 layman/config_modules/makeconf/makeconf.py | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/layman/config_modules/makeconf/makeconf.py b/layman/config_modules/makeconf/makeconf.py
index 140e694..6a6890c 100644
--- a/layman/config_modules/makeconf/makeconf.py
+++ b/layman/config_modules/makeconf/makeconf.py
@@ -235,20 +235,23 @@ class ConfigHandler:
                                      if i.strip()]
 
             for i in (disabled_overlays, enabled_overlays, overlays):
-                for o in i:
+                for o in (i or []):
                     if o[:len(self.storage)] == self.storage:
                         oname = os.path.basename(o)
                         if  oname in self.db.keys():
                             if i == disabled_overlays:
-                                self.disabled.append(path([self.storage, oname]))
+                                self.disabled.append(path([self.storage,
+                                                           oname]))
                             self.overlays.append(self.db[oname])
                         else:
                             # These are additional overlays that we dont know
-                            # anything about. The user probably added them manually
+                            # know anything about. The user probably added
+                            # them manually.
                             self.extra.append(o)
                     else:
-                        # These are additional overlays that we dont know anything
-                        # about. The user probably added them manually
+                        # These are additional overlays that we dont know
+                        # anything about. The user probably added them
+                        # manually.
                         self.extra.append(o)
 
         else:
@@ -346,6 +349,10 @@ class ConfigHandler:
         overlays += '\n'.join(self.extra)
         overlays += '"'
 
+        if not re.search('ENABLED=', self.data):
+            self.data = '\n'.join((enabled_overlays, disabled_overlays,
+                                   overlays))
+
         enabled_content = self.my_enabled_re.sub(enabled_overlays, self.data)
         disabled_content = self.my_disabled_re.sub(disabled_overlays, enabled_content)
         content = self.my_portdir_re.sub(overlays, disabled_content)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/layman:master commit in: layman/config_modules/makeconf/
@ 2015-02-08  3:48 Devan Franchini
  0 siblings, 0 replies; 2+ messages in thread
From: Devan Franchini @ 2015-02-08  3:48 UTC (permalink / raw
  To: gentoo-commits

commit:     8b9f365238cb372fd104f640d6471ae4b93da352
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  8 03:42:40 2015 +0000
Commit:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Feb  8 03:44:40 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=8b9f3652

makeconf.py: Rewrites overlay names to make.conf

If make.conf is not present on the system and layman-updater is ran
then the presently installed overlays will be written to the make.conf
file.

---
 layman/config_modules/makeconf/makeconf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/layman/config_modules/makeconf/makeconf.py b/layman/config_modules/makeconf/makeconf.py
index 6a6890c..bb12bc9 100644
--- a/layman/config_modules/makeconf/makeconf.py
+++ b/layman/config_modules/makeconf/makeconf.py
@@ -255,7 +255,7 @@ class ConfigHandler:
                         self.extra.append(o)
 
         else:
-            self.overlays = []
+            self.overlays = [self.db[i] for i in self.db]
             self.data     = 'PORTDIR_OVERLAY="\n"\n'
 
         self.extra = [i for i in self.extra


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-08  3:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-26 19:38 [gentoo-commits] proj/layman:master commit in: layman/config_modules/makeconf/ Devan Franchini
  -- strict thread matches above, loose matches on Subject: below --
2015-02-08  3:48 Devan Franchini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox