summaryrefslogtreecommitdiff
path: root/mk/checksum
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-08-14 19:22:31 +0000
committerjlam <jlam@pkgsrc.org>2007-08-14 19:22:31 +0000
commitea9b9c675e4641ff39c259e744188aa6f8b3add2 (patch)
tree62bb6aaf8bdb42f66ffd8b45b01e9d5f3632b3f3 /mk/checksum
parent597066239a2bdbee49f62255623f696c462eb870 (diff)
downloadpkgsrc-ea9b9c675e4641ff39c259e744188aa6f8b3add2.tar.gz
Strip out *all* of the lines containing NetBSD RCS ID tags that may
be lurking in patches before computing their checksum.
Diffstat (limited to 'mk/checksum')
-rw-r--r--mk/checksum/distinfo.awk17
1 files changed, 5 insertions, 12 deletions
diff --git a/mk/checksum/distinfo.awk b/mk/checksum/distinfo.awk
index 1a9f8268c29..d119c4a97c1 100644
--- a/mk/checksum/distinfo.awk
+++ b/mk/checksum/distinfo.awk
@@ -1,6 +1,6 @@
#!/usr/bin/awk -f
#
-# $NetBSD: distinfo.awk,v 1.2 2007/08/14 19:19:01 jlam Exp $
+# $NetBSD: distinfo.awk,v 1.3 2007/08/14 19:22:31 jlam Exp $
#
# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -57,7 +57,7 @@
#
# For example:
#
-# $NetBSD: distinfo.awk,v 1.2 2007/08/14 19:19:01 jlam Exp $
+# $NetBSD: distinfo.awk,v 1.3 2007/08/14 19:22:31 jlam Exp $
#
# SHA1 (make-3.81.tar.gz) = cd4fa5a3184176492bf0799593a8f250a728210c
# RMD160 (make-3.81.tar.gz) = a713a72875cb9a29568677c98022465c6f55cbbf
@@ -327,17 +327,10 @@ function patchsum( alg, dir, file, patch, cmd, a, i) {
if ((system(cmd) != 0) || !is_patch(file)) continue
for (a = 0; a < P; a++) {
alg = patch_algorithms[a]
- cmd = SED " 1q " patch
+ cmd = SED " -e '/[$]NetBSD.*/d' " patch " | " DIGEST " " alg
cmd | getline; close(cmd)
- if ($0 ~ /^[$]NetBSD/) {
- cmd = SED " 1d " patch " | " DIGEST " " alg
- cmd | getline; close(cmd)
- sub("^", alg " (" file ") = ")
- lines[L++] = $0
- } else {
- cmd = "cd " dir " && " DIGEST " " alg " " file
- cmd | getline lines[L++]; close(cmd)
- }
+ sub("^", alg " (" file ") = ")
+ lines[L++] = $0
}
}
}