From 94084ef96909a6f938daa2a90aedc1cc3fc8ce0b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 19 Jan 2013 18:33:10 -0800 Subject: repoman: fix stable mask to use correct profile We can't rely on the internal config instance from the given package instance, since it does not refer to the correct profile. --- pym/portage/versions.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pym/portage/versions.py') diff --git a/pym/portage/versions.py b/pym/portage/versions.py index 1dd2ff359..46c53089b 100644 --- a/pym/portage/versions.py +++ b/pym/portage/versions.py @@ -408,11 +408,13 @@ class _pkg_str(_unicode): settings = self._settings except AttributeError: raise AttributeError('stable') + if not settings.local_config: + # Since repoman uses different config instances for + # different profiles, our local instance does not + # refer to the correct profile. + raise AssertionError('invalid context') stable = settings._isStable(self) - if settings.local_config: - # For repoman, don't cache this value, since - # it needs to be re-computed for each profile. - self.__dict__['_stable'] = stable + self.__dict__['_stable'] = stable return stable def pkgsplit(mypkg, silent=1, eapi=None): -- cgit v1.2.3-1-g7c22