diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-09-18 04:38:36 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-09-18 04:38:36 +0000 |
commit | 0a520e5ee483fc280abe8308efbfcdd126f74d30 (patch) | |
tree | 058e67e3bbac3933687def8f3eb1824842560c4f | |
parent | 492977477027e478e9733c12abce94cb90b4dadb (diff) | |
download | portage-0a520e5ee483fc280abe8308efbfcdd126f74d30.tar.gz portage-0a520e5ee483fc280abe8308efbfcdd126f74d30.tar.bz2 portage-0a520e5ee483fc280abe8308efbfcdd126f74d30.zip |
add a sanity check for diff before using it #48184
svn path=/main/branches/2.0/; revision=1998
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | bin/etc-update | 12 |
2 files changed, 11 insertions, 4 deletions
@@ -7,6 +7,9 @@ 2. /var/cache/edb/world is now /var/lib/portage/world. 3. /etc/portage/profile/virtuals is _USER_ configs only. + 18 Sep 2005; Mike Frysinger <vapier@gentoo.org> bin/etc-update: + Make sure diff works before checking config files #48184. + 08 Sep 2005; Brian Harring <ferringb@gentoo.org> bin/ebuild.sh: Fixed unpack so that it actually works now. ${tarvars} placement was a bit wrong, which is odd considering it shouldn't have changed. diff --git a/bin/etc-update b/bin/etc-update index fb09ea9d0..24af6dccc 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -12,11 +12,9 @@ export PORTAGE_CALLER="etc-update" -eval $(python -c 'import portage; print "export PORTAGE_TMPDIR="+portage.settings["PORTAGE_TMPDIR"]; print "export USERLAND="+portage.settings["USERLAND"]') +eval $(python -c 'import portage; print "export PORTAGE_TMPDIR="+portage.settings["PORTAGE_TMPDIR"];') -if [ "$USERLAND" == "BSD" ] ; then - function sed() { gsed "$@"; } -elif [ "$USERLAND" == "Darwin" ] && [ -x /bin/gsed ]; then +if type -p gsed >/dev/null ; then function sed() { gsed "$@"; } fi @@ -38,6 +36,12 @@ function scan() { count=0 input=0 + # Sanity check to make sure diff exists and works + if ! diff -v &>/dev/null ; then + echo "ERROR: 'diff' does not seem to work, aborting" + exit 1 + fi + for path in ${CONFIG_PROTECT}; do if [ -d ${path} ]; then ofile="" for file in `find ${path}/ -iname "._cfg????_*" | |