From 4c71d9222f01eb2f7bb79f4f6f382c4e2b027296 Mon Sep 17 00:00:00 2001 From: rillig Date: Tue, 1 Nov 2005 00:26:35 +0000 Subject: 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 $. --- pkgtools/pkglint/files/pkglint.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pkgtools') 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 = ; + close(DIG); + chomp($chksum); if ($sum ne $chksum) { $line->log_error("${alg} checksum of $file differs (expected ${sum}, got ${chksum}). Rerun '$conf_make makepatchsum'."); } -- cgit v1.2.3