pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/wrapper Removed the transform_to_nocache() function...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/78be313660ec
branches:  trunk
changeset: 522010:78be313660ec
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Nov 30 12:11:48 2006 +0000

description:
Removed the transform_to_nocache() function, since it is unused.

When discarding arguments, split_arg is set to yes, so that no empty
arguments are added to the resulting command line. A more informative
debugging message is also printed in that case.

Added a debugging message to transform_to(), for consistency with the
other functions.

diffstat:

 mk/wrapper/wrapper-subr.sh |  17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diffs (44 lines):

diff -r 0ace3530a2cf -r 78be313660ec mk/wrapper/wrapper-subr.sh
--- a/mk/wrapper/wrapper-subr.sh        Thu Nov 30 12:07:08 2006 +0000
+++ b/mk/wrapper/wrapper-subr.sh        Thu Nov 30 12:11:48 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: wrapper-subr.sh,v 1.5 2006/11/30 11:40:24 rillig Exp $
+# $NetBSD: wrapper-subr.sh,v 1.6 2006/11/30 12:11:48 rillig Exp $
 #
 # This file contains shell functions that are useful to the wrapper
 # scripts.
@@ -24,28 +24,25 @@
        split_arg=yes
 }
 
-# usage: transform_to_nocache "newarg"
-transform_to_nocache() {
-       arg="$1"
-       $debug_log $wrapperlog "    ($wrapsubr_name) to: $1"
-       addtocache=no
-}
-
 # usage: transform_discard
 transform_discard() {
-       transform_to ""
+       $debug_log $wrapperlog "    ($wrapsubr_name) discarded: $arg"
+       arg=""
+       addtocache=yes
+       split_arg=yes
 }
 
 # usage: transform_discard_with_warning [warning]
 transform_discard_with_warning() {
        _warning=${1-"discarding option $arg"}
        msg_log "$wrapperlog" "WARNING: [$wrapsubr_name] $_warning"
-       transform_to ""
+       transform_discard
        addtocache=no
 }
 
 # usage: transform_pass
 transform_pass() {
+       $debug_log $wrapperlog "    ($wrapsubr_name) to: $arg [unchanged]"
        addtocache=yes
 }
 



Home | Main Index | Thread Index | Old Index