From 56d71b78acf2544d6b56528ed8cd3952a5ece5b5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 28 Sep 2010 12:59:13 -0700 Subject: [PATCH] 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. --- pym/portage/repository/config.py | 6 ++++-- 1 file 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 -- 2.26.2