diff options
author | Paul Varner <fuzzyray@gentoo.org> | 2010-11-24 19:00:55 +0000 |
---|---|---|
committer | Paul Varner <fuzzyray@gentoo.org> | 2010-11-24 19:00:55 +0000 |
commit | 80ac73eada364f47bbebd574202297ead230b2ab (patch) | |
tree | 660429b8de09a461e1b4e08db1dcee9c8a0676f3 /app-portage | |
parent | Version bump. (diff) | |
download | gentoo-2-80ac73eada364f47bbebd574202297ead230b2ab.tar.gz gentoo-2-80ac73eada364f47bbebd574202297ead230b2ab.tar.bz2 gentoo-2-80ac73eada364f47bbebd574202297ead230b2ab.zip |
Update euse to look for portage config files in new as well as old paths - bug 346519. Make euse prefix aware.
(Portage version: 2.1.9.24/cvs/Linux i686)
Diffstat (limited to 'app-portage')
-rw-r--r-- | app-portage/gentoolkit/ChangeLog | 10 | ||||
-rw-r--r-- | app-portage/gentoolkit/files/0.3.0_rc11-euse.patch | 120 | ||||
-rw-r--r-- | app-portage/gentoolkit/files/0.3.0_rc11-euse_prefix.patch | 16 | ||||
-rw-r--r-- | app-portage/gentoolkit/gentoolkit-0.3.0_rc11-r3.ebuild (renamed from app-portage/gentoolkit/gentoolkit-0.3.0_rc11-r2.ebuild) | 4 |
4 files changed, 148 insertions, 2 deletions
diff --git a/app-portage/gentoolkit/ChangeLog b/app-portage/gentoolkit/ChangeLog index d3c06db03f2f..852995fb7ef6 100644 --- a/app-portage/gentoolkit/ChangeLog +++ b/app-portage/gentoolkit/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-portage/gentoolkit # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit/ChangeLog,v 1.200 2010/11/22 20:22:33 fuzzyray Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit/ChangeLog,v 1.201 2010/11/24 19:00:55 fuzzyray Exp $ + +*gentoolkit-0.3.0_rc11-r3 (24 Nov 2010) + + 24 Nov 2010; Paul Varner <fuzzyray@gentoo.org> +files/0.3.0_rc11-euse.patch, + +files/0.3.0_rc11-euse_prefix.patch, -gentoolkit-0.3.0_rc11-r2.ebuild, + +gentoolkit-0.3.0_rc11-r3.ebuild: + Update euse to look for portage config files in new as well as old paths - + bug 346519. Make euse prefix aware *gentoolkit-0.3.0_rc11-r2 (22 Nov 2010) diff --git a/app-portage/gentoolkit/files/0.3.0_rc11-euse.patch b/app-portage/gentoolkit/files/0.3.0_rc11-euse.patch new file mode 100644 index 000000000000..2d811097fb0e --- /dev/null +++ b/app-portage/gentoolkit/files/0.3.0_rc11-euse.patch @@ -0,0 +1,120 @@ +Index: bin/euse +=================================================================== +--- bin/euse (revision 867) ++++ bin/euse (working copy) +@@ -9,11 +9,42 @@ + PROGRAM_NAME=euse + VERSION="svn" + +-MAKE_CONF_PATH=/etc/make.conf +-MAKE_GLOBALS_PATH=/etc/make.globals +-MAKE_PROFILE_PATH=/etc/make.profile +-MAKE_CONF_BACKUP_PATH=/etc/make.conf.euse_backup ++ETC="/etc" ++USR_SHARE_PORTAGE="/usr/share/portage" + ++# define error function so it can be used immediately ++error() { ++ echo "ERROR: ${1}" ++ set +f ++ exit 1 ++} ++ ++# /etc/make.conf can now exist in /etc/portage/make.conf, prefer it over /etc/make.conf for changes ++if [ -e "${ETC}/portage/make.conf" ]; then ++ MAKE_CONF_PATH="${ETC}/portage/make.conf" ++elif [ -e "${ETC}/make.conf" ]; then ++ MAKE_CONF_PATH="${ETC}/make.conf" ++else ++ error "make.conf does not exist" ++fi ++MAKE_CONF_BACKUP_PATH="${MAKE_CONF_PATH}.euse_backup" ++ ++# /etc/make.globals has been moved to /usr/share/portage/config/make.globals ++if [ -e "${USR_SHARE_PORTAGE}/config/make.globals" ]; then ++ MAKE_GLOBALS_PATH="${USR_SHARE_PORTAGE}/config/make.globals" ++else ++ MAKE_GLOBALS_PATH="${ETC}/make.globals" ++fi ++ ++# /etc/make.profile or /etc/portage/make.profile, if /etc/make.profile exists, it will be used ++if [ -e "${ETC}/make.profile" ]; then ++ MAKE_PROFILE_PATH="${ETC}/make.profile" ++elif [ -e "${ETC}/portage/make.profile" ]; then ++ MAKE_PROFILE_PATH="${ETC}/portage/make.profile" ++else ++ error "make.profile does not exist" ++fi ++ + [ -z "${MODE}" ] && MODE="showhelp" # available operation modes: showhelp, showversion, showdesc, showflags, modify + + parse_arguments() { +@@ -49,12 +80,6 @@ + done + } + +-error() { +- echo "ERROR: ${1}" +- set +f +- exit 1 +-} +- + get_real_path() { + set -P + cd "$1" +@@ -67,12 +92,16 @@ + # file permission tests + local descdir + local make_defaults ++ local make_conf + + [[ ! -d "${MAKE_PROFILE_PATH}" || ! -r "${MAKE_PROFILE_PATH}" ]] && error "${MAKE_PROFILE_PATH} is not readable" ++ # ++ for make_conf in $(get_all_make_conf); do ++ [ ! -r "${make_conf}" ] && error "${make_conf} is not readable" ++ done + + descdir="$(get_portdir)/profiles" + +- [ ! -r "${MAKE_CONF_PATH}" ] && error "${MAKE_CONF_PATH} is not readable" + [ ! -r "${MAKE_GLOBALS_PATH}" ] && error "${MAKE_GLOBALS_PATH} is not readable" + [ -z "$(get_portdir)" ] && error "\$PORTDIR couldn't be determined" + [ ! -d "${descdir}" ] && error "${descdir} does not exist or is not a directory" +@@ -160,8 +189,10 @@ + + ACTIVE_FLAGS[0]="$(reduce_incrementals ${USE})" + USE="" +- source "${MAKE_CONF_PATH}" +- ACTIVE_FLAGS[1]="$(reduce_incrementals ${USE})" ++ for x in $(get_all_make_conf); do ++ source "${x}" ++ ACTIVE_FLAGS[1]="$(reduce_incrementals ${ACTIVE_FLAGS[1]} ${USE})" ++ done + USE="" + for x in $(get_all_make_defaults); do + source "${x}" +@@ -196,6 +227,13 @@ + fi + } + ++# get all make.conf files that exist on the system ++get_all_make_conf() { ++ # At least one of the files exists or we would not have made it this far ++ for x in ${ETC}/make.conf ${ETC}/portage/make.conf; do ++ [ -e "${x}" ] && echo "${x}" ++ done ++} + # get all make.defaults by traversing the cascaded profile directories + get_all_make_defaults() { + local curdir +@@ -272,7 +310,9 @@ + for x in $(get_all_make_defaults); do + source "${x}" + done +- source "${MAKE_CONF_PATH}" ++ for x in $(get_all_make_conf); do ++ source "${x}" ++ done + USE="${use_backup}" + fi + echo "${PORTDIR}" diff --git a/app-portage/gentoolkit/files/0.3.0_rc11-euse_prefix.patch b/app-portage/gentoolkit/files/0.3.0_rc11-euse_prefix.patch new file mode 100644 index 000000000000..3ebf3cd171bb --- /dev/null +++ b/app-portage/gentoolkit/files/0.3.0_rc11-euse_prefix.patch @@ -0,0 +1,16 @@ +Index: bin/euse +=================================================================== +--- bin/euse (revision 868) ++++ bin/euse (working copy) +@@ -9,8 +9,9 @@ + PROGRAM_NAME=euse + VERSION="svn" + +-ETC="/etc" +-USR_SHARE_PORTAGE="/usr/share/portage" ++EPREFIX=${EPREFIX:-$(portageq envvar EPREFIX)} ++ETC="${EPREFIX}/etc" ++USR_SHARE_PORTAGE="${EPREFIX}/usr/share/portage" + + # define error function so it can be used immediately + error() { diff --git a/app-portage/gentoolkit/gentoolkit-0.3.0_rc11-r2.ebuild b/app-portage/gentoolkit/gentoolkit-0.3.0_rc11-r3.ebuild index f4b0b8e6d17e..a4229a9c0c01 100644 --- a/app-portage/gentoolkit/gentoolkit-0.3.0_rc11-r2.ebuild +++ b/app-portage/gentoolkit/gentoolkit-0.3.0_rc11-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit/gentoolkit-0.3.0_rc11-r2.ebuild,v 1.1 2010/11/22 20:22:33 fuzzyray Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit/gentoolkit-0.3.0_rc11-r3.ebuild,v 1.1 2010/11/24 19:00:55 fuzzyray Exp $ EAPI="3" SUPPORT_PYTHON_ABIS="1" @@ -41,6 +41,8 @@ src_prepare() { epatch "${FILESDIR}/${PV}-eshowkw_indir.patch" epatch "${FILESDIR}/${PV}-setup.py.patch" epatch "${FILESDIR}/${PV}-cpv.py.patch" + epatch "${FILESDIR}/${PV}-euse.patch" + epatch "${FILESDIR}/${PV}-euse_prefix.patch" } src_install() { |