Merged from trunk 11362:11366
authorFabian Groffen <grobian@gentoo.org>
Sat, 9 Aug 2008 10:44:29 +0000 (10:44 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 9 Aug 2008 10:44:29 +0000 (10:44 -0000)
   | 11363   | Update date in dyn_help copyright header. Thanks to grobian. |
   | zmedico |                                                              |

   | 11364   | Escape use flags before compiling regular expressions from   |
   | zmedico | them. Thanks to pchrist for reporting.                       |

   | 11365   | Make eapi*_src_install die since they're not supported.      |
   | zmedico |                                                              |

   | 11366   | Add a reference to the default sets.conf location. Thanks to |
   | zmedico | dberkholz for the suggestion.                                |

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

bin/ebuild.sh
man/emerge.1
pym/_emerge/__init__.py
pym/portage/__init__.py

index b59a5c1426985adb5ef1620761f209e551ed5bba..3bed57470eb14f007fe1b1ac6334d657cb89226d 100755 (executable)
@@ -1045,7 +1045,7 @@ dyn_preinst() {
 dyn_help() {
        echo
        echo "Portage"
-       echo "Copyright 1999-2006 Gentoo Foundation"
+       echo "Copyright 1999-2008 Gentoo Foundation"
        echo
        echo "How to use the ebuild command:"
        echo
@@ -1464,21 +1464,21 @@ _ebuild_phase_funcs() {
                                eapi0_src_configure () { die "$FUNCNAME is not supported" ; }
                                eapi0_src_compile   () { _eapi0_src_compile   "$@" ; }
                                eapi0_src_test      () { _eapi0_src_test      "$@" ; }
-                               eapi0_src_install   () { _eapi0_src_install   "$@" ; }
+                               eapi0_src_install   () { die "$FUNCNAME is not supported" ; }
 
                                eapi1_pkg_nofetch   () { _eapi0_pkg_nofetch   "$@" ; }
                                eapi1_src_unpack    () { _eapi0_src_unpack    "$@" ; }
                                eapi1_src_configure () { die "$FUNCNAME is not supported" ; }
                                eapi1_src_compile   () { _eapi1_src_compile   "$@" ; }
                                eapi1_src_test      () { _eapi0_src_test      "$@" ; }
-                               eapi1_src_install   () { _eapi0_src_install   "$@" ; }
+                               eapi1_src_install   () { die "$FUNCNAME is not supported" ; }
 
                                eapi2_pkg_nofetch   () { _eapi0_pkg_nofetch   "$@" ; }
                                eapi2_src_unpack    () { _eapi0_src_unpack    "$@" ; }
                                eapi2_src_configure () { _eapi2_src_configure "$@" ; }
                                eapi2_src_compile   () { _eapi2_src_compile   "$@" ; }
                                eapi2_src_test      () { _eapi0_src_test      "$@" ; }
-                               eapi2_src_install   () { _eapi0_src_install   "$@" ; }
+                               eapi2_src_install   () { die "$FUNCNAME is not supported" ; }
 
                                for x in $default_phases ; do
                                        eval "default_$x() { eapi2_$x \"\$@\" ; }"
index e252c19b14a203a3736d51809b11032be43aa424..e92f85d2e9a3fc1ef2b5219d2098929c734903c4 100644 (file)
@@ -63,7 +63,8 @@ and \fBworld\fR.  \fBsystem\fR refers to a set of packages
 deemed necessary for your system to run properly. \fBworld\fR
 contains all the packages listed in \fB/var/lib/portage/world\fR.  [See
 \fBFILES\fR below for more information.] Other sets can exist depending
-on the current configuration. Note that a \fIset\fR
+on the current configuration. The default set configuration is located
+in \fB/usr/share/portage/config/sets.conf\fR. Note that a \fIset\fR
 is generally used in conjunction with \fB\-\-update\fR. When used as 
 arguments to \fBemerge\fR sets have to be prefixed with \fB@\fR to be
 recognized.
@@ -673,6 +674,9 @@ Marius Mauch <genone@gentoo.org>
 Here is a common list of files you will probably be interested in.  For a 
 complete listing, please refer to the \fBportage\fR(5) man page.
 .TP
+.B /usr/share/portage/config/sets.conf
+Contains the default set configuration.
+.TP
 .B /var/lib/portage/world
 Contains a list of all user\-specified packages.  You can safely edit
 this file, adding packages that you want to be considered in \fBworld\fR
index d0655453cbce62c2a130098026116ee72f604d5e..781532758a84ca6eb36c1166b90975ddd660586f 100644 (file)
@@ -1492,8 +1492,12 @@ class Package(Task):
                                except AttributeError:
                                        all = object.__getattribute__(self, "all")
                                        iuse_implicit = object.__getattribute__(self, "iuse_implicit")
-                                       self.regex = re.compile("^(%s)$" % "|".join(
-                                               chain((re.escape(x) for x in all), iuse_implicit)))
+                                       # Escape anything except ".*" which is supposed
+                                       # to pass through from _get_implicit_iuse()
+                                       regex = (re.escape(x) for x in chain(all, iuse_implicit))
+                                       regex = "^(%s)$" % "|".join(regex)
+                                       regex = regex.replace("\\.\\*", ".*")
+                                       self.regex = re.compile(regex)
                        return object.__getattribute__(self, name)
 
        def _get_hash_key(self):
index 8919d78f7e6c1cdd8f8c8b658a22f646e2fa284a..4f20ae592f8a04f9d4af874a567ccea08d42d14a 100644 (file)
@@ -2088,8 +2088,12 @@ class config(object):
                iuse_implicit = self._get_implicit_iuse()
                iuse_implicit.update(x.lstrip("+-") for x in iuse.split())
 
-               self.configdict["pkg"]["PORTAGE_IUSE"] = \
-                       "^(%s)$" % "|".join(sorted(iuse_implicit))
+               # Escape anything except ".*" which is supposed
+               # to pass through from _get_implicit_iuse()
+               regex = sorted(re.escape(x) for x in iuse_implicit)
+               regex = "^(%s)$" % "|".join(regex)
+               regex = regex.replace("\\.\\*", ".*")
+               self.configdict["pkg"]["PORTAGE_IUSE"] = regex
 
                ebuild_force_test = self.get("EBUILD_FORCE_TEST") == "1"
                if ebuild_force_test and ebuild_phase and \