From: Mike Frysinger Date: Tue, 1 Nov 2005 01:33:24 +0000 (-0000) Subject: merge tweaks from trunk X-Git-Tag: v2.1_pre1~81 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=107ac23de8de2419979dd06da0966de23a52bbb3;p=portage.git merge tweaks from trunk svn path=/main/branches/2.0/; revision=2224 --- diff --git a/bin/etc-update b/bin/etc-update index 24af6dccc..8289d1077 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -1,7 +1,7 @@ #!/bin/bash -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id: /var/cvsroot/gentoo-src/portage/bin/etc-update,v 1.23.2.5 2005/05/29 12:40:08 jstubbs Exp $ +# $Id: etc-update 1912 2005-08-25 03:54:42Z ferringb $ # Author Brandon Low # @@ -12,8 +12,6 @@ export PORTAGE_CALLER="etc-update" -eval $(python -c 'import portage; print "export PORTAGE_TMPDIR="+portage.settings["PORTAGE_TMPDIR"];') - if type -p gsed >/dev/null ; then function sed() { gsed "$@"; } fi @@ -42,7 +40,9 @@ function scan() { exit 1 fi - for path in ${CONFIG_PROTECT}; do if [ -d ${path} ]; then + for path in ${CONFIG_PROTECT} ; do + [ ! -d ${path} ] && continue + ofile="" for file in `find ${path}/ -iname "._cfg????_*" | sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3\%\2\%\3:" | @@ -96,7 +96,7 @@ function scan() { opath="${rpath}" fi done - fi; done + done } @@ -358,17 +358,19 @@ function die() { # # Run the script # -scriptname=`basename $0` +scriptname=$(basename $0) trap die term +export PORTAGE_TMPDIR=$(/usr/lib/portage/bin/portageq envvar PORTAGE_TMPDIR) + TMP="${PORTAGE_TMPDIR}/$$" rm -rf ${TMP} 2> /dev/null mkdir ${TMP} || die "failed mkdir command!" 1 # I need the CONFIG_PROTECT value -CONFIG_PROTECT=$(/usr/lib/portage/bin/portageq config_protect) -CONFIG_PROTECT_MASK=$(/usr/lib/portage/bin/portageq config_protect_mask) +CONFIG_PROTECT=$(/usr/lib/portage/bin/portageq envvar CONFIG_PROTECT) +CONFIG_PROTECT_MASK=$(/usr/lib/portage/bin/portageq envvar CONFIG_PROTECT_MASK) # load etc-config's configuration EU_AUTOMERGE=`get_config eu_automerge`