pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/wrapper The options -I, -L and -R must not be follo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/35ca178dd021
branches:  trunk
changeset: 525694:35ca178dd021
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Feb 21 09:43:26 2007 +0000

description:
The options -I, -L and -R must not be followed directly by another
option. Instead of just merging them, the wrapper fails. Let's see which
packages get broken by that and then fix them.

I've also heard rumours that a plain -L is used as an alias to -nostdlib
in some compilers. This would have been handled wrong up to now, since
it definitely wasn't intended to be merged with the following argument.

diffstat:

 mk/wrapper/arg-source      |  5 ++++-
 mk/wrapper/wrapper-subr.sh |  9 ++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 9cfb63945435 -r 35ca178dd021 mk/wrapper/arg-source
--- a/mk/wrapper/arg-source     Wed Feb 21 06:08:30 2007 +0000
+++ b/mk/wrapper/arg-source     Wed Feb 21 09:43:26 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: arg-source,v 1.9 2006/12/15 12:46:24 martti Exp $
+# $NetBSD: arg-source,v 1.10 2007/02/21 09:43:26 rillig Exp $
 #
 # Copyright (c) 2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -54,6 +54,9 @@
        ##############################################################
        -[ILR])
                nextarg="$1"; shift
+               case "$nextarg" in
+               -*) fail "arg-source" "An $arg option must not be followed by another option, $nextarg." ;;
+               esac
                shquote "$nextarg"; nextarg="$shquoted"
                append_queue argbuf "$arg$nextarg"
                $debug_log $wrapperlog "    (arg-source) push: $arg$nextarg"
diff -r 9cfb63945435 -r 35ca178dd021 mk/wrapper/wrapper-subr.sh
--- a/mk/wrapper/wrapper-subr.sh        Wed Feb 21 06:08:30 2007 +0000
+++ b/mk/wrapper/wrapper-subr.sh        Wed Feb 21 09:43:26 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: wrapper-subr.sh,v 1.8 2007/02/19 14:50:33 rillig Exp $
+# $NetBSD: wrapper-subr.sh,v 1.9 2007/02/21 09:43:26 rillig Exp $
 #
 # This file contains shell functions that are useful to the wrapper
 # scripts.
@@ -60,3 +60,10 @@
        msg_log stderr "ERROR: [$wrapsubr_name] $1"
        exit 1
 }
+
+# usage: fail "source-file" "error message"
+fail() {
+       msg_log "$wrapperlog" "ERROR: [$1] $2"
+       msg_log stderr "ERROR: [$1] $2"
+       exit 1
+}



Home | Main Index | Thread Index | Old Index