From: Zac Medico Date: Thu, 25 Jul 2013 19:54:49 +0000 (-0700) Subject: RepoConfig: backward compat SYNC for mirrorselect X-Git-Tag: v2.2.0_alpha189~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=73188d23c68989539a913716bb8a4132d2c43316;p=portage.git RepoConfig: backward compat SYNC for mirrorselect This restores SYNC support which was removed in commit 47e8d22dabf2197193c8f133698fb967afa560f4. --- diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 919a9d67b..57cc3a3c9 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -575,9 +575,11 @@ class RepoConfigLoader(object): if "PORTAGE_REPOSITORIES" in settings: portdir = "" portdir_overlay = "" + portdir_sync = "" else: portdir = settings.get("PORTDIR", "") portdir_overlay = settings.get("PORTDIR_OVERLAY", "") + portdir_sync = settings.get("SYNC", "") try: self._parse(paths, prepos, ignored_map, @@ -697,6 +699,12 @@ class RepoConfigLoader(object): # This happens if main-repo has been set in repos.conf. prepos[main_repo].priority = -1000 + # Backward compatible SYNC support for mirrorselect. + if portdir_sync and main_repo is not None: + if portdir_sync.startswith("rsync://"): + prepos[main_repo].sync_uri = portdir_sync + prepos[main_repo].sync_type = "rsync" + # Include repo.name in sort key, for predictable sorting # even when priorities are equal. prepos_order = sorted(prepos.items(),