pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/pkgformat/pkg reduce-depends.awk: Avoid gensub() fo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e4631846300b
branches:  trunk
changeset: 369585:e4631846300b
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sun Oct 01 17:57:18 2017 +0000

description:
reduce-depends.awk: Avoid gensub() for portability.

diffstat:

 mk/pkgformat/pkg/reduce-depends.awk |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 8e8b0c2ced06 -r e4631846300b mk/pkgformat/pkg/reduce-depends.awk
--- a/mk/pkgformat/pkg/reduce-depends.awk       Sun Oct 01 15:50:34 2017 +0000
+++ b/mk/pkgformat/pkg/reduce-depends.awk       Sun Oct 01 17:57:18 2017 +0000
@@ -1,6 +1,6 @@
 #!/usr/bin/awk -f
 #
-# $NetBSD: reduce-depends.awk,v 1.5 2017/10/01 04:00:40 jlam Exp $
+# $NetBSD: reduce-depends.awk,v 1.6 2017/10/01 17:57:18 jlam Exp $
 #
 # Copyright (c) 2006-2017 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -111,7 +111,7 @@
        endpoint = ""                   # return value if patterns array is empty
        for (key in patterns) {
                endpoint = patterns[key]
-               pkg = shquote(gensub(cmp, "-", 1, key))
+               pkg = key; sub(cmp, "-", pkg); pkg = shquote(pkg)
                match_all = 1
                for (pattern in patterns) {
                        if (key == pattern) continue



Home | Main Index | Thread Index | Old Index