repoman: fix PORTDIR{,_OVERLAY} interference
Ensure that the repository corresponding to $PWD overrides a
repository of the same name referenced by the existing PORTDIR
or PORTDIR_OVERLAY settings (broken since commit
eab5b86c2d45765ea718e1e9488dde43c9bbac7e).
diff --git a/bin/repoman b/bin/repoman
index faf0232..e31f699 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -595,6 +595,12 @@
[%s]
location = %s
""") % (repo_name, portdir_overlay))
+ # Ensure that the repository corresponding to $PWD overrides a
+ # repository of the same name referenced by the existing PORTDIR
+ # or PORTDIR_OVERLAY settings.
+ repoman_settings['PORTDIR_OVERLAY'] = "%s %s" % \
+ (repoman_settings.get('PORTDIR_OVERLAY', ''),
+ portage._shell_quote(portdir_overlay))
repositories = portage.repository.config.RepoConfigLoader([repos_conf_file, tmp_conf_file], repoman_settings)
# We have to call the config constructor again so that attributes
# dependent on config.repositories are initialized correctly.