diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-08-25 23:12:27 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-08-25 23:12:27 -0700 |
commit | 9de2d1e3a6f2ff26da3c91b741db0bdae7cdb0b0 (patch) | |
tree | 0f2c5247a52502b52935acd918db8e7cac4b82cd /bin/repoman | |
parent | ebc4f381f351f6c67dd911be1efa2df51de87f07 (diff) | |
download | portage-9de2d1e3a6f2ff26da3c91b741db0bdae7cdb0b0.tar.gz portage-9de2d1e3a6f2ff26da3c91b741db0bdae7cdb0b0.tar.bz2 portage-9de2d1e3a6f2ff26da3c91b741db0bdae7cdb0b0.zip |
repoman: add a simple unit test
Diffstat (limited to 'bin/repoman')
-rwxr-xr-x | bin/repoman | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/repoman b/bin/repoman index e0494d95e..d9ecfc469 100755 --- a/bin/repoman +++ b/bin/repoman @@ -96,7 +96,8 @@ os.umask(0o22) # behave incrementally. repoman_incrementals = tuple(x for x in \ portage.const.INCREMENTALS if x != 'ACCEPT_KEYWORDS') -repoman_settings = portage.config(local_config=False) +eprefix = os.environ.get("__REPOMAN_TEST_EPREFIX") +repoman_settings = portage.config(local_config=False, _eprefix=eprefix) repoman_settings.lock() if repoman_settings.get("NOCOLOR", "").lower() in ("yes", "true") or \ @@ -570,13 +571,13 @@ if options.mode == 'commit' and not options.pretend and not vcs: options.pretend = True # Ensure that PORTDIR_OVERLAY contains the repository corresponding to $PWD. -repoman_settings = portage.config(local_config=False) +repoman_settings = portage.config(local_config=False, _eprefix=eprefix) repoman_settings['PORTDIR_OVERLAY'] = "%s %s" % \ (repoman_settings.get('PORTDIR_OVERLAY', ''), portdir_overlay) # We have to call the config constructor again so # that config.repositories is initialized correctly. -repoman_settings = portage.config(local_config=False, env=dict(os.environ, - PORTDIR_OVERLAY=repoman_settings['PORTDIR_OVERLAY'])) +repoman_settings = portage.config(local_config=False, _eprefix=eprefix, + env=dict(os.environ, PORTDIR_OVERLAY=repoman_settings['PORTDIR_OVERLAY'])) root = '/' trees = { @@ -1887,7 +1888,7 @@ for x in scanlist: config_incrementals=repoman_incrementals, local_config=False, _unmatched_removal=options.unmatched_removal, - env=env) + env=env, _eprefix=eprefix) if options.without_mask: dep_settings._mask_manager = \ copy.deepcopy(dep_settings._mask_manager) |