pkgsrc-Changes-HG archive

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

[pkgsrc/pkgsrc-2021Q2]: pkgsrc/mk/wrapper Pullup ticket #6482 - requested by ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a7f77e381441
branches:  pkgsrc-2021Q2
changeset: 455660:a7f77e381441
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Thu Jul 08 08:04:56 2021 +0000

description:
Pullup ticket #6482 - requested by maya
mk: Linux bootstrap fix

Revisions pulled up:
- mk/wrapper/gen-transform.sh                                   1.13

---
   Module Name:    pkgsrc
   Committed By:   maya
   Date:           Fri Jun 25 22:02:06 UTC 2021

   Modified Files:
           pkgsrc/mk/wrapper: gen-transform.sh

   Log Message:
   switch $echo statements to printf "%s\n".
   dash considers \1 to be octal escape.

   for PR pkg/56248, from Michael Forney's suggestion.
   $echo seems to be used for performance here (was previously cat) and not
   for compatibility with some esoteric system.

   I misunderstood things, and failed to test the last bootstrap diff, breaking
   bootstrap on Ubuntu for a while.

diffstat:

 mk/wrapper/gen-transform.sh |  59 ++++++++++++++++++++++----------------------
 1 files changed, 29 insertions(+), 30 deletions(-)

diffs (115 lines):

diff -r 27addf57c5ab -r a7f77e381441 mk/wrapper/gen-transform.sh
--- a/mk/wrapper/gen-transform.sh       Sun Jul 04 19:36:17 2021 +0000
+++ b/mk/wrapper/gen-transform.sh       Thu Jul 08 08:04:56 2021 +0000
@@ -1,6 +1,6 @@
 #! @WRAPPER_SHELL@
 #
-# $NetBSD: gen-transform.sh,v 1.12 2018/08/22 20:48:37 maya Exp $
+# $NetBSD: gen-transform.sh,v 1.12.24.1 2021/07/08 08:04:56 bsiegert Exp $
 #
 # Copyright (c) 2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -33,7 +33,6 @@
 wrapperlog="${WRAPPER_LOG-@_WRAP_LOG@}"
 debug="${WRAPPER_DEBUG-no}"
 
-echo="@ECHO@"
 test="@TEST@"
 
 . $shell_lib
@@ -135,16 +134,16 @@
                case $_action in
                transform)
                        $debug_log $wrapperlog "   (gen-transform) $_cmd: $@"
-                       $echo "s|^$1\(/[^$_sep]*\.la[$_sep]\)|$2\1|g"
-                       $echo "s|^$1\(/[^$_sep]*\.la\)$|$2\1|g"
+                       printf "%s\n" "s|^$1\(/[^$_sep]*\.la[$_sep]\)|$2\1|g"
+                       printf "%s\n" "s|^$1\(/[^$_sep]*\.la\)$|$2\1|g"
                        ;;
                untransform)
                        $debug_log $wrapperlog "   (gen-transform) $_cmd: $@"
-                       $echo "s|\([$_sep]\)$1\(/[^$_sep]*\.la[$_sep]\)|\1$2\2|g"
-                       $echo "s|\([$_sep]\)$1\(/[^$_sep]*\.la[$_sep]\)|\1$2\2|g"
-                       $echo "s|\([$_sep]\)$1\(/[^$_sep]*\.la\)$|\1$2\2|g"
-                       $echo "s|^$1\(/[^$_sep]*\.la[$_sep]\)|$2\1|g"
-                       $echo "s|^$1\(/[^$_sep]*\.la\)$|$2\1|g"
+                       printf "%s\n" "s|\([$_sep]\)$1\(/[^$_sep]*\.la[$_sep]\)|\1$2\2|g"
+                       printf "%s\n" "s|\([$_sep]\)$1\(/[^$_sep]*\.la[$_sep]\)|\1$2\2|g"
+                       printf "%s\n" "s|\([$_sep]\)$1\(/[^$_sep]*\.la\)$|\1$2\2|g"
+                       printf "%s\n" "s|^$1\(/[^$_sep]*\.la[$_sep]\)|$2\1|g"
+                       printf "%s\n" "s|^$1\(/[^$_sep]*\.la\)$|$2\1|g"
                        ;;
                esac
                ;;
@@ -197,16 +196,16 @@
                case $_action in
                transform)
                        $debug_log $wrapperlog "   (gen-transform) $_cmd: $@"
-                       $echo "s|^$1\([$_sep]\)|$2\1|g"
-                       $echo "s|^$1$|$2|g"
+                       printf "%s\n" "s|^$1\([$_sep]\)|$2\1|g"
+                       printf "%s\n" "s|^$1$|$2|g"
                        ;;
                untransform)
                        $debug_log $wrapperlog "   (gen-transform) $_cmd: $@"
-                       $echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
-                       $echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
-                       $echo "s|\([$_sep]\)$1$|\1$2|g"
-                       $echo "s|^$1\([$_sep]\)|$2\1|g"
-                       $echo "s|^$1$|$2|g"
+                       printf "%s\n" "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
+                       printf "%s\n" "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
+                       printf "%s\n" "s|\([$_sep]\)$1$|\1$2|g"
+                       printf "%s\n" "s|^$1\([$_sep]\)|$2\1|g"
+                       printf "%s\n" "s|^$1$|$2|g"
                        ;;
                esac
                ;;
@@ -227,16 +226,16 @@
                case $_action in
                transform)
                        $debug_log $wrapperlog "   (gen-transform) $_cmd: $@"
-                       $echo "s|^$1\(/[^$_sep]*\)$2\([$_sep]\)|$3\1$4|g"
-                       $echo "s|^$1\(/[^$_sep]*\)$2$|$3\1$4|g"
+                       printf "%s\n" "s|^$1\(/[^$_sep]*\)$2\([$_sep]\)|$3\1$4|g"
+                       printf "%s\n" "s|^$1\(/[^$_sep]*\)$2$|$3\1$4|g"
                        ;;
                untransform)
                        $debug_log $wrapperlog "   (gen-transform) $_cmd: $@"
-                       $echo "s|\([$_sep]\)$1\(/[^$_sep]*\)$2\([$_sep]\)|\1$3\2$4\3|g"
-                       $echo "s|\([$_sep]\)$1\(/[^$_sep]*\)$2\([$_sep]\)|\1$3\2$4\3|g"
-                       $echo "s|\([$_sep]\)$1\(/[^$_sep]*\)$2$|\1$3\2$4|g"
-                       $echo "s|^$1\(/[^$_sep]*\)$2\([$_sep]\)|$3\1$4|g"
-                       $echo "s|^$1\(/[^$_sep]*\)$2$|$3\1$4|g"
+                       printf "%s\n" "s|\([$_sep]\)$1\(/[^$_sep]*\)$2\([$_sep]\)|\1$3\2$4\3|g"
+                       printf "%s\n" "s|\([$_sep]\)$1\(/[^$_sep]*\)$2\([$_sep]\)|\1$3\2$4\3|g"
+                       printf "%s\n" "s|\([$_sep]\)$1\(/[^$_sep]*\)$2$|\1$3\2$4|g"
+                       printf "%s\n" "s|^$1\(/[^$_sep]*\)$2\([$_sep]\)|$3\1$4|g"
+                       printf "%s\n" "s|^$1\(/[^$_sep]*\)$2$|$3\1$4|g"
                        ;;
                esac
                ;;
@@ -282,16 +281,16 @@
                case $_action in
                transform)
                        $debug_log $wrapperlog "   (gen-transform) $_cmd: $@"
-                       $echo "s|^$1[^$_sep]*\([$_sep]\)|\1|g"
-                       $echo "s|^$1[^$_sep]*$||g"
+                       printf "%s\n" "s|^$1[^$_sep]*\([$_sep]\)|\1|g"
+                       printf "%s\n" "s|^$1[^$_sep]*$||g"
                        ;;
                untransform)
                        $debug_log $wrapperlog "   (gen-transform) $_cmd: $@"
-                       $echo "s|\([$_sep]\)$1[^$_sep]*\([$_sep]\)|\1\2|g"
-                       $echo "s|\([$_sep]\)$1[^$_sep]*\([$_sep]\)|\1\2|g"
-                       $echo "s|\([$_sep]\)$1[^$_sep]*$|\1|g"
-                       $echo "s|^$1[^$_sep]*\([$_sep]\)|\1|g"
-                       $echo "s|^$1[^$_sep]*$||g"
+                       printf "%s\n" "s|\([$_sep]\)$1[^$_sep]*\([$_sep]\)|\1\2|g"
+                       printf "%s\n" "s|\([$_sep]\)$1[^$_sep]*\([$_sep]\)|\1\2|g"
+                       printf "%s\n" "s|\([$_sep]\)$1[^$_sep]*$|\1|g"
+                       printf "%s\n" "s|^$1[^$_sep]*\([$_sep]\)|\1|g"
+                       printf "%s\n" "s|^$1[^$_sep]*$||g"
                        ;;
                esac
                ;;



Home | Main Index | Thread Index | Old Index