summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-11-01 00:26:35 +0000
committerrillig <rillig@pkgsrc.org>2005-11-01 00:26:35 +0000
commit4c71d9222f01eb2f7bb79f4f6f382c4e2b027296 (patch)
treef89a14b31060d164f0ba03e35fdc39950239807b /pkgtools
parent9ff5c7a6c9c308af1738031b660a36e3ee033e60 (diff)
downloadpkgsrc-4c71d9222f01eb2f7bb79f4f6f382c4e2b027296.tar.gz
As I don't know how many backslashes are needed inside backticks to make
one backslash reach the argument to sed(1), the backticks are replaced with a call to open("... |"). Now the first argument to sed(1) contains \$ instead of a simple $.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index c1bcd3e2822..edf2f96208b 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.311 2005/10/30 23:09:40 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.312 2005/11/01 00:26:35 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -913,8 +913,10 @@ sub checkfile_distinfo($$) {
if ($file =~ /^patch-[A-Za-z0-9]+$/) {
if (-f "${dir}/${patchdir}/${file}") {
- my $chksum = `sed -e '/\$NetBSD.*/d' $dir/$patchdir/$file | digest $alg`;
- $chksum =~ s/\r*\n*\z//;
+ open(DIG, "sed '/\\\$NetBSD.*/d' ${dir}/${patchdir}/${file} | digest ${alg} |") or die;
+ my $chksum = <DIG>;
+ close(DIG);
+ chomp($chksum);
if ($sum ne $chksum) {
$line->log_error("${alg} checksum of $file differs (expected ${sum}, got ${chksum}). Rerun '$conf_make makepatchsum'.");
}