Support SYNC setting in make.conf. v2.2.0_alpha190
authorZac Medico <zmedico@gentoo.org>
Fri, 26 Jul 2013 21:01:17 +0000 (14:01 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 26 Jul 2013 21:01:17 +0000 (14:01 -0700)
This fixes commit 73188d23c68989539a913716bb8a4132d2c43316 so that it
works with make.conf.

pym/portage/package/ebuild/config.py

index 619d0724018491bb93a099eec8370a16d32fa1e4..070a522b9fa6a3010b1cd1088ab8d54635b7df23 100644 (file)
@@ -491,6 +491,7 @@ class config(object):
                        known_repos = []
                        portdir = ""
                        portdir_overlay = ""
+                       portdir_sync = None
                        for confs in [make_globals, make_conf, self.configdict["env"]]:
                                v = confs.get("PORTDIR")
                                if v is not None:
@@ -500,9 +501,15 @@ class config(object):
                                if v is not None:
                                        portdir_overlay = v
                                        known_repos.extend(shlex_split(v))
+                               v = confs.get("SYNC")
+                               if v is not None:
+                                       portdir_sync = v
+
                        known_repos = frozenset(known_repos)
                        self["PORTDIR"] = portdir
                        self["PORTDIR_OVERLAY"] = portdir_overlay
+                       if portdir_sync:
+                               self["SYNC"] = portdir_sync
                        self.lookuplist = [self.configdict["env"]]
                        if repositories is None:
                                self.repositories = load_repository_config(self)