"compile", "test", "install",
"package", "preinst", "postinst","prerm", "postrm",
"nofetch", "config", "info", "other")
+SUPPORTED_FEATURES = frozenset([
+ "assume-digests", "buildpkg", "buildsyspkg", "ccache",
+ "collision-protect", "digest", "distcc", "distlocks",
+ "fakeroot", "fail-clean", "fixpackages", "getbinpkg",
+ "installsources", "keeptemp", "keepwork", "lmirror",
+ "metadata-transfer", "mirror", "multilib-strict", "news",
+ "noauto", "noclean", "nodoc", "noinfo", "noman", "nostrip"
+ "notitles", "parallel-fetch", "parse-eapi-ebuild-head",
+ "parse-eapi-glep-55", "preserve-libs", "protect-owned",
+ "python-trace", "sandbox", "sesandbox", "severe", "sfperms",
+ "sign", "skiprocheck", "split-elog", "split-log", "splitdebug",
+ "strict", "stricter", "suidctl", "test", "test-fail-continue",
+ "unmerge-logs", "unmerge-orphans", "userfetch", "userpriv",
+ "usersandbox", "usersync", "webrsync-gpg"])
EAPI = 3
from portage.const import CACHE_PATH, CUSTOM_PROFILE_PATH, \
DEPCACHE_PATH, GLOBAL_CONFIG_PATH, INCREMENTALS, MAKE_CONF_FILE, \
MODULES_FILE_PATH, PORTAGE_BIN_PATH, PORTAGE_PYM_PATH, \
- PRIVATE_PATH, PROFILE_PATH, USER_CONFIG_PATH, USER_VIRTUALS_FILE
+ PRIVATE_PATH, PROFILE_PATH, SUPPORTED_FEATURES, USER_CONFIG_PATH, \
+ USER_VIRTUALS_FILE
from portage.data import portage_gid
from portage.dbapi import dbapi
from portage.dbapi.porttree import portdbapi
myflags = []
continue
+ if mykey == "FEATURES":
+ if x[:1] in ("+", "-"):
+ val = x[1:]
+ else:
+ val = x
+
+ if val not in SUPPORTED_FEATURES:
+ writemsg(colorize("BAD",
+ _("FEATURES variable contains an unknown value: %s") % x) \
+ + "\n", noiselevel=-1)
+ continue
+
if x[0]=="+":
# Not legal. People assume too much. Complain.
writemsg(colorize("BAD",
- _("USE flags should not start with a '+': %s") % x) \
+ _("%s values should not start with a '+': %s") % (mykey,x)) \
+ "\n", noiselevel=-1)
x=x[1:]
if not x: