From 34772f7970c41e665b7c6f1628dc70f16ee6ec57 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 9 Aug 2008 10:44:29 +0000 Subject: [PATCH] Merged from trunk 11362:11366 | 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 | 8 ++++---- man/emerge.1 | 6 +++++- pym/_emerge/__init__.py | 8 ++++++-- pym/portage/__init__.py | 8 ++++++-- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index b59a5c142..3bed57470 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -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 \"\$@\" ; }" diff --git a/man/emerge.1 b/man/emerge.1 index e252c19b1..e92f85d2e 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -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 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 diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index d0655453c..781532758 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -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): diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 8919d78f7..4f20ae592 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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 \ -- 2.26.2