Merged from trunk 7965:7975
authorFabian Groffen <grobian@gentoo.org>
Mon, 8 Oct 2007 17:06:07 +0000 (17:06 -0000)
committerFabian Groffen <grobian@gentoo.org>
Mon, 8 Oct 2007 17:06:07 +0000 (17:06 -0000)
   | 7966    | Document IUSE defaults.                                      |
   | zmedico |                                                              |

   | 7967    | Shorten the reference to IUSE defaults since it's now        |
   | zmedico | documented in ebuild(5).                                     |

   | 7974    | handle empty sets properly                                   |
   | genone  |                                                              |

   | 7975    | Strip the - prefix from EAPI in getmaskingstatus() if        |
   | zmedico | necessary.                                                   |

svn path=/main/branches/prefix/; revision=8002

man/ebuild.5
man/make.conf.5
pym/emerge/__init__.py
pym/portage/__init__.py

index e07d8f0719145d646698df61a0fe6875a3fd1586..dd879a59fae4375ddb887d9776d3e95e1a99dcb4 100644 (file)
@@ -172,7 +172,11 @@ must add it first.
 \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
index ee7493bd1ce20c77b84ab7e82fb6f7da016fd025..f0b81b5e80c60e81dfb742f95fb4c1f657acf818 100644 (file)
@@ -537,7 +537,7 @@ USE from make.conf
 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
index 839d8a17da0e62e8f2a9c7abc6a712591b8cfe20..bea5cd26e90fd6ea4843df1f5202b20d8ba9e836 100644 (file)
@@ -6470,6 +6470,7 @@ def emerge_main():
        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:
@@ -6477,10 +6478,19 @@ def emerge_main():
                                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\"."
index 6d5a91a0d0209736d2be064d83e34fa5b12fda1d..88662b704723d09c76d0b8bed82897c0968b7fc4 100644 (file)
@@ -5038,6 +5038,8 @@ def getmaskingstatus(mycpv, settings=None, portdb=None):
                # 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()