repoman: fix PORTDIR{,_OVERLAY} interference v2.2.0_alpha186
authorZac Medico <zmedico@gentoo.org>
Sat, 29 Jun 2013 04:21:38 +0000 (21:21 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 29 Jun 2013 04:21:38 +0000 (21:21 -0700)
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).

bin/repoman

index faf0232482e0f4f141c90abe387cbd16d43982bf..e31f69924b4c666e974a234625ec721acf1155bf 100755 (executable)
@@ -595,6 +595,12 @@ except KeyError:
                [%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.