summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-28 12:59:13 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-28 12:59:13 -0700
commit56d71b78acf2544d6b56528ed8cd3952a5ece5b5 (patch)
tree6853a77a26643a23d403ca51d5b63bf1b1dc4f04
parentcd198d28dd1d5ad5dbd5d82b1c9872a18f26abdc (diff)
downloadportage-56d71b78acf2544d6b56528ed8cd3952a5ece5b5.tar.gz
portage-56d71b78acf2544d6b56528ed8cd3952a5ece5b5.tar.bz2
portage-56d71b78acf2544d6b56528ed8cd3952a5ece5b5.zip
Fix RepoConfigLoader so that it's possible to use PORTDIR_OVERLAY
to override the repo that PORTDIR refers to. This fixes a regression which prevented a common repoman use case from working in which the user has PORTDIR refering to a rsync tree and has a separate cvs tree with the same repo_name as PORTDIR. When the user tries to use repoman with the cvs tree, the cvs repo is appended to PORTDIR_OVERLAY and we want it to override the conflicting PORTDIR setting.
-rw-r--r--pym/portage/repository/config.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 0d4412082..e79cddb70 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -134,11 +134,11 @@ class RepoConfigLoader(object):
def add_overlays(portdir, portdir_overlay, prepos, ignored_map, ignored_location_map):
"""Add overlays in PORTDIR_OVERLAY as repositories"""
overlays = []
- port_ov = [normalize_path(i) for i in shlex_split(portdir_overlay)]
- overlays.extend(port_ov)
if portdir:
portdir = normalize_path(portdir)
overlays.append(portdir)
+ port_ov = [normalize_path(i) for i in shlex_split(portdir_overlay)]
+ overlays.extend(port_ov)
if overlays:
#overlay priority is negative because we want them to be looked before any other repo
base_priority = -1
@@ -196,6 +196,8 @@ class RepoConfigLoader(object):
prepos_order.sort(key=repo_priority, reverse=True)
if portdir:
+ if portdir not in location_map:
+ portdir = prepos[ignored_location_map[portdir]].location
portdir_repo = prepos[location_map[portdir]]
portdir_sync = settings.get('SYNC', '')
#if SYNC variable is set and not overwritten by repos.conf