diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-01 01:33:24 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-01 01:33:24 +0000 |
commit | 107ac23de8de2419979dd06da0966de23a52bbb3 (patch) | |
tree | ce698327edeea336b41fb25c090331fc34165f6c | |
parent | 9418c932da174d50f4420945290a3d05ba1a4277 (diff) | |
download | portage-107ac23de8de2419979dd06da0966de23a52bbb3.tar.gz portage-107ac23de8de2419979dd06da0966de23a52bbb3.tar.bz2 portage-107ac23de8de2419979dd06da0966de23a52bbb3.zip |
merge tweaks from trunk
svn path=/main/branches/2.0/; revision=2224
-rwxr-xr-x | bin/etc-update | 20 |
1 files changed, 11 insertions, 9 deletions
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 <lostlogic@gentoo.org> # @@ -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` |