diff options
| author | idl0r <idl0r@gentoo.org> | 2010-01-31 11:48:05 +0000 |
|---|---|---|
| committer | idl0r <idl0r@gentoo.org> | 2010-01-31 11:48:05 +0000 |
| commit | 9aefbb6cced5e071a628dd46f6fffc3afdf84305 (patch) | |
| tree | 200c81edd18915a0cceeaba287b98dc56200bdb9 | |
| parent | 27c8d3ad61443a2c6c7be892e487cdfac4addcc5 (diff) | |
| download | gentoolkit-9aefbb6cced5e071a628dd46f6fffc3afdf84305.tar.gz | |
Check for eerror in die() since an invalid option(long) or
missing arg will end up in calling die() before /etc/init.d/functions.sh
has been sourced.
svn path=/trunk/gentoolkit/; revision=735
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rwxr-xr-x | bin/revdep-rebuild | 12 |
2 files changed, 16 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2010-31-01: Christian Ruppert <idl0r@gentoo.org> + * revdep-rebuild: Check for eerror in die() since an invalid option(long) or + missing arg will end up in calling die() before /etc/init.d/functions.sh + has been sourced. + 2009-01-11: Paul Varner <fuzzyray@gentoo.org> * revdep-rebuild: Set environment using 'portageq -v' (Bug 300229) diff --git a/bin/revdep-rebuild b/bin/revdep-rebuild index ce9e61c..6726c7e 100755 --- a/bin/revdep-rebuild +++ b/bin/revdep-rebuild @@ -241,7 +241,17 @@ clean_var() { die() { local status=$1 shift - eerror "$@" + + # Check if eerror has been loaded. + # Its loaded _after_ opt parsing but not before due to RC_NOCOLOR. + type eerror &> /dev/null + + if [[ $? -eq 0 ]]; + then + eerror "$@" + else + echo " * ${@}" >> /dev/stderr + fi exit $status } ## |
