From 48ac1c8a4b506c1167adfc3bf01d5b397edf83bb Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Tue, 1 Jan 2008 21:55:01 +0000 Subject: [PATCH] Merged from trunk 9125:9128 | 9126 | Fix config.setcpv() to properly call config.regenerate() in | | zmedico | cases when USE needs to be regenerated due to FEATURES=test | | | to USE=test mapping. | | 9128 | When searching for "test" in IUSE, account for IUSE | | zmedico | defaults. | svn path=/main/branches/prefix/; revision=9132 --- pym/portage/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index ece610ee9..a91a5edf6 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -1927,7 +1927,14 @@ class config(object): self.configdict["pkg"]["USE"] = self.puse[:] # this gets appended to USE if iuse != self.configdict["pkg"].get("IUSE",""): self.configdict["pkg"]["IUSE"] = iuse - if self._use_wildcards or self.get("EBUILD_PHASE"): + test_use_changed = False + if "test" in self.features: + test_use_changed = \ + bool(re.search(r'(^|\s)[-+]?test(\s|$)', iuse)) != \ + ("test" in self.get("PORTAGE_USE","").split()) + if self.get("EBUILD_PHASE") or \ + self._use_wildcards or \ + test_use_changed: # Without this conditional, regenerate() would be called # *every* time. has_changed = True -- 2.26.2