Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/lintpkgsrc lintpkgsrc: update to 4.95
details: https://anonhg.NetBSD.org/pkgsrc/rev/bd65a16e0c1f
branches: trunk
changeset: 437120:bd65a16e0c1f
user: tnn <tnn%pkgsrc.org@localhost>
date: Mon Aug 17 02:38:54 2020 +0000
description:
lintpkgsrc: update to 4.95
Use xargs when executing digest for -m.
PR pkg/48335: error when using -m and too many files in DISTDIR
diffstat:
pkgtools/lintpkgsrc/Makefile | 5 ++---
pkgtools/lintpkgsrc/files/lintpkgsrc.pl | 20 +++++++++++++++-----
2 files changed, 17 insertions(+), 8 deletions(-)
diffs (56 lines):
diff -r 7381c3e07b9b -r bd65a16e0c1f pkgtools/lintpkgsrc/Makefile
--- a/pkgtools/lintpkgsrc/Makefile Sun Aug 16 23:21:29 2020 +0000
+++ b/pkgtools/lintpkgsrc/Makefile Mon Aug 17 02:38:54 2020 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.32 2020/01/18 23:33:26 rillig Exp $
+# $NetBSD: Makefile,v 1.33 2020/08/17 02:38:54 tnn Exp $
-PKGNAME= lintpkgsrc-4.94
-PKGREVISION= 2
+PKGNAME= lintpkgsrc-4.95
CATEGORIES= pkgtools
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
diff -r 7381c3e07b9b -r bd65a16e0c1f pkgtools/lintpkgsrc/files/lintpkgsrc.pl
--- a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Sun Aug 16 23:21:29 2020 +0000
+++ b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Mon Aug 17 02:38:54 2020 +0000
@@ -1,6 +1,6 @@
#!@PERL5@
-# $NetBSD: lintpkgsrc.pl,v 1.16 2020/07/16 10:11:39 wiz Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.17 2020/08/17 02:38:54 tnn Exp $
# Written by David Brownlee <abs%netbsd.org@localhost>.
#
@@ -1648,9 +1648,17 @@
next;
}
- open( DIGEST, "digest $sum @{$sumfiles{$sum}}|" )
- || fail("Run digest: $!");
- while (<DIGEST>) {
+ my $pid = open3(my $in, my $out, undef, "xargs", "digest", $sum);
+ defined($pid) || fail "fork";
+ my $pid2 = fork();
+ defined($pid2) || fail "fork";
+ if ($pid2) {
+ close($in);
+ } else {
+ print $in "@{$sumfiles{$sum}}";
+ exit 0;
+ }
+ while (<$out>) {
if (m/^$sum ?\(([^\)]+)\) = (\S+)/) {
if ( $distfiles{$1}{sum} ne $2 ) {
print $1, " ($sum)\n";
@@ -1658,7 +1666,9 @@
}
}
}
- close(DIGEST);
+ close($out);
+ waitpid( $pid, 0 ) || fail "xargs digest $sum";
+ waitpid( $pid2, 0 ) || fail "pipe write to xargs";
}
safe_chdir('/'); # Do not want to stay in $pkgdistdir
}
Home |
Main Index |
Thread Index |
Old Index