pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/pkgformat/pkg
Module Name: pkgsrc
Committed By: jlam
Date: Sun Oct 1 22:58:19 UTC 2017
Modified Files:
pkgsrc/mk/pkgformat/pkg: reduce-depends.awk
Log Message:
reduce-depends.awk: Avoid "delete array" statement for portability.
POSIX awk doesn't allow "delete array" to delete an entire array.
For portability, one must delete each element of the array.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/mk/pkgformat/pkg/reduce-depends.awk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/pkgformat/pkg/reduce-depends.awk
diff -u pkgsrc/mk/pkgformat/pkg/reduce-depends.awk:1.6 pkgsrc/mk/pkgformat/pkg/reduce-depends.awk:1.7
--- pkgsrc/mk/pkgformat/pkg/reduce-depends.awk:1.6 Sun Oct 1 17:57:18 2017
+++ pkgsrc/mk/pkgformat/pkg/reduce-depends.awk Sun Oct 1 22:58:19 2017
@@ -1,6 +1,6 @@
#!/usr/bin/awk -f
#
-# $NetBSD: reduce-depends.awk,v 1.6 2017/10/01 17:57:18 jlam Exp $
+# $NetBSD: reduce-depends.awk,v 1.7 2017/10/01 22:58:19 jlam Exp $
#
# Copyright (c) 2006-2017 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -82,6 +82,11 @@ function version_cmp(v1, cmp, v2, cmd, p
return 0
}
+function delete_array(array, key)
+{
+ for (key in array) delete array[key]
+}
+
###
# get_endpoint(cmp, patterns)
#
@@ -266,10 +271,10 @@ BEGIN {
if (!(depend in reduced)) reduced[depend] = ++N
}
- delete lt_patterns
- delete le_patterns
- delete gt_patterns
- delete ge_patterns
+ delete_array(lt_patterns)
+ delete_array(le_patterns)
+ delete_array(gt_patterns)
+ delete_array(ge_patterns)
}
# Output reduced dependencies.
Home |
Main Index |
Thread Index |
Old Index