\fBIUSE\fR
This should be a list of any and all USE flags that are leveraged within
your build script. The only USE flags that should not be listed here are
-arch related flags (see \fBKEYWORDS\fR).
+arch related flags (see \fBKEYWORDS\fR). Beginning with \fBEAPI 1\fR, it
+is possible to prefix flags with + or - in order to create default settings
+that respectively enable or disable the corresponding \fBUSE\fR flags. For
+details about \fBUSE\fR flag stacking order, refer to the \fBUSE_ORDER\fR
+variable in \fBmake.conf\fR(5).
.TP
\fBDEPEND\fR
This should contain a list of all packages that are required for the
USE from make.defaults and package.use in the profile (see \fBportage\fR(5))
.TP
.B pkginternal
-USE from ebuild IUSE defaults (flags enabled via a + prefix; see \fBebuild\fR(5))
+USE from \fBebuild\fR(5) IUSE defaults
.TP
.B env.d
USE from the environment variables defined by files in \fI/etc/env.d/\fR
setconfig = make_default_config(settings, trees[settings["ROOT"]])
del setconfigpaths
if myaction not in ["search", "metadata", "sync"]:
+ oldargs = myfiles[:]
packagesets, setconfig_errors = setconfig.getSetsWithAliases()
for s in packagesets:
if s in myfiles:
if myaction in ["unmerge", "prune", "clean", "depclean"] and not packagesets[s].supportsOperation("unmerge"):
print "emerge: the given set %s does not support unmerge operations" % s
sys.exit(1)
- myfiles.extend(packagesets[s].getAtoms())
+ if not packagesets[s].getAtoms():
+ print "emerge: '%s' is an empty set" % s
+ else:
+ myfiles.extend(packagesets[s].getAtoms())
for e in packagesets[s].errors:
print e
myfiles.remove(s)
+ # Need to handle empty sets specially, otherwise emerge will react
+ # with the help message for empty argument lists
+ if oldargs and not myfiles:
+ print "emerge: no targets left after set expansion"
+ sys.exit(0)
+ del oldargs
if ("--tree" in myopts) and ("--columns" in myopts):
print "emerge: can't specify both of \"--tree\" and \"--columns\"."
# The "depend" phase apparently failed for some reason. An associated
# error message will have already been printed to stderr.
return ["corruption"]
+ if eapi.startswith("-"):
+ eapi = eapi[1:]
if not eapi_is_supported(eapi):
return ["required EAPI %s, supported EAPI %s" % (eapi, portage.const.EAPI)]
mygroups = mygroups.split()