diff options
author | Dan Armak <danarmak@gentoo.org> | 2002-03-27 22:33:54 +0000 |
---|---|---|
committer | Dan Armak <danarmak@gentoo.org> | 2002-03-27 22:33:54 +0000 |
commit | 0b6b2c69545934fdcde49c4b1e482f7f2737862f (patch) | |
tree | 863f08c2c1cb4823f1b07d031c2d56ec4ea4b7fc /eclass/debug.eclass | |
parent | man page/LFH fixes (diff) | |
download | historical-0b6b2c69545934fdcde49c4b1e482f7f2737862f.tar.gz historical-0b6b2c69545934fdcde49c4b1e482f7f2737862f.tar.bz2 historical-0b6b2c69545934fdcde49c4b1e482f7f2737862f.zip |
big commit that makes eclasses work wth both old portages (1.8.8, rc6 profile) and the new ones
(>=1.8.9_pre32, 1.0 profile). the latter have some parts of the eclasses in ebuild.sh. Now i ahve a
unified code base and commit changes easily.
Diffstat (limited to 'eclass/debug.eclass')
-rw-r--r-- | eclass/debug.eclass | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/eclass/debug.eclass b/eclass/debug.eclass index a4b9aed3ba2c..b7bfe95d09c2 100644 --- a/eclass/debug.eclass +++ b/eclass/debug.eclass @@ -1,19 +1,29 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Dan Armak <danarmak@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/debug.eclass,v 1.12 2002/03/27 18:33:23 danarmak Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/debug.eclass,v 1.13 2002/03/27 22:33:53 danarmak Exp $ # This provides functions for verbose output for debugging -# redirect output, unset to disable. use e.g. /dev/stdout to write into a file/device. -# use special setting "on" to echo the output - unlike above, doesn't violate sandbox. -# the test here is to enable people to export DEBUG_OUTPUT before running ebuild/emerge -# so that they won't have to edit debug.eclass anymore -#[ -n "$ECLASS_DEBUG_OUTPUT" ] || ECLASS_DEBUG_OUTPUT="on" +# Moved into ebuild.sh in portage-1.8.9_pre32. Here for compatibility. -# used internally for output -# redirects output wherever's needed -# in the future might use e* from /etc/init.d/functions.sh if i feel like it -debug-print() { +if [ -z "$COMPAT" ]; then + + einfo "!!! Error: debug.eclass sourced, but compatibility mode not set. This ebuild needs +to be updated, please report." + exit 1 + +else + + # redirect output, unset to disable. use e.g. /dev/stdout to write into a file/device. + # use special setting "on" to echo the output - unlike above, doesn't violate sandbox. + # the test here is to enable people to export DEBUG_OUTPUT before running ebuild/emerge + # so that they won't have to edit debug.eclass anymore + #[ -n "$ECLASS_DEBUG_OUTPUT" ] || ECLASS_DEBUG_OUTPUT="on" + + # used internally for output + # redirects output wherever's needed + # in the future might use e* from /etc/init.d/functions.sh if i feel like it + debug-print() { while [ "$1" ]; do @@ -30,21 +40,22 @@ debug-print() { shift done -} - -# std message functions + } -debug-print-function() { + # std message functions + + debug-print-function() { str="$1: entering function" shift debug-print "$str, parameters: $*" -} + } -debug-print-section() { + debug-print-section() { debug-print "now in section $*" -} + } +fi |