pkgsrc-Changes archive

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

CVS commit: [pkgsrc-2021Q2] pkgsrc/mk/wrapper



Module Name:    pkgsrc
Committed By:   bsiegert
Date:           Thu Jul  8 08:04:56 UTC 2021

Modified Files:
        pkgsrc/mk/wrapper [pkgsrc-2021Q2]: gen-transform.sh

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.24.1 pkgsrc/mk/wrapper/gen-transform.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/wrapper/gen-transform.sh
diff -u pkgsrc/mk/wrapper/gen-transform.sh:1.12 pkgsrc/mk/wrapper/gen-transform.sh:1.12.24.1
--- pkgsrc/mk/wrapper/gen-transform.sh:1.12     Wed Aug 22 20:48:37 2018
+++ pkgsrc/mk/wrapper/gen-transform.sh  Thu Jul  8 08:04:56 2021
@@ -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 @@ shell_lib="@_WRAP_SHELL_LIB@"
 wrapperlog="${WRAPPER_LOG-@_WRAP_LOG@}"
 debug="${WRAPPER_DEBUG-no}"
 
-echo="@ECHO@"
 test="@TEST@"
 
 . $shell_lib
@@ -135,16 +134,16 @@ gen()
                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 @@ gen()
                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 @@ gen()
                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 @@ gen()
                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