aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-07-25 12:54:49 -0700
committerZac Medico <zmedico@gentoo.org>2013-07-25 12:54:49 -0700
commit73188d23c68989539a913716bb8a4132d2c43316 (patch)
tree26f18723e5d27e22a80d4ec734094dfcb4ca5065 /pym/portage/repository/config.py
parentRELEASE-NOTES: Next release is 2.1.13 (diff)
downloadportage-73188d23c68989539a913716bb8a4132d2c43316.tar.gz
portage-73188d23c68989539a913716bb8a4132d2c43316.tar.bz2
portage-73188d23c68989539a913716bb8a4132d2c43316.zip
RepoConfig: backward compat SYNC for mirrorselect
This restores SYNC support which was removed in commit 47e8d22dabf2197193c8f133698fb967afa560f4.
Diffstat (limited to 'pym/portage/repository/config.py')
-rw-r--r--pym/portage/repository/config.py8
1 files changed, 8 insertions, 0 deletions
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(),