summaryrefslogtreecommitdiffstats
path: root/bin/ebuild
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-21 04:13:09 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-21 04:13:09 -0700
commit13af7cb709711b00394e80b3a7a928a95133229f (patch)
tree31796dfc41386b1f2c1fa3a28d220035570eb19a /bin/ebuild
parent81de00c7c6d8c591f2e8727fa465af8db5cfbdf1 (diff)
downloadportage-13af7cb709711b00394e80b3a7a928a95133229f.tar.gz
portage-13af7cb709711b00394e80b3a7a928a95133229f.tar.bz2
portage-13af7cb709711b00394e80b3a7a928a95133229f.zip
Add a wrapper around config.features that provides the following
enhancements: * The FEATURES variable is automatically synchronized upon modification. * Modifications result in a permanent override that will cause the change to propagate to the incremental stacking mechanism in config.regenerate(). This eliminates the need to call config.backup_changes() when FEATURES is modified, since any overrides are guaranteed to persist despite calls to config.reset(). This allows cleanup of all code that overrides FEATURES, and also allows config.regenerate() to stack FEATURES such that special cases are not needed for package.env handling inside config.setcpv().
Diffstat (limited to 'bin/ebuild')
-rwxr-xr-xbin/ebuild12
1 files changed, 3 insertions, 9 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 3600881f3..9ce058b5c 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -220,15 +220,9 @@ if "test" in pargs:
# of problems such as masked "test" USE flag.
tmpsettings["EBUILD_FORCE_TEST"] = "1"
tmpsettings.backup_changes("EBUILD_FORCE_TEST")
- if "test" not in tmpsettings.features:
- tmpsettings.features.add("test")
- tmpsettings["FEATURES"] = " ".join(sorted(tmpsettings.features))
- tmpsettings.backup_changes("FEATURES")
-
-if 'fail-clean' in tmpsettings.features:
- tmpsettings.features.remove('fail-clean')
- tmpsettings["FEATURES"] = " ".join(sorted(tmpsettings.features))
- tmpsettings.backup_changes("FEATURES")
+ tmpsettings.features.add("test")
+
+tmpsettings.features.discard('fail-clean')
if opts.skip_manifest:
tmpsettings["EBUILD_SKIP_MANIFEST"] = "1"