summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2020-08-17 02:38:54 +0000
committertnn <tnn@pkgsrc.org>2020-08-17 02:38:54 +0000
commitf393ae7681f789304a7de7889e9c7be7f143cb3f (patch)
tree66f40fc2903e46825e63bed6e2b2620fb6bb4291
parent2328a6b45f260f219579df4ca7ff8b79c0c14b70 (diff)
downloadpkgsrc-f393ae7681f789304a7de7889e9c7be7f143cb3f.tar.gz
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
-rw-r--r--pkgtools/lintpkgsrc/Makefile5
-rwxr-xr-xpkgtools/lintpkgsrc/files/lintpkgsrc.pl20
2 files changed, 17 insertions, 8 deletions
diff --git a/pkgtools/lintpkgsrc/Makefile b/pkgtools/lintpkgsrc/Makefile
index 84186990cbc..5669413e50f 100644
--- a/pkgtools/lintpkgsrc/Makefile
+++ b/pkgtools/lintpkgsrc/Makefile
@@ -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
diff --git a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl
index 1ea748424f1..d402b914a43 100755
--- a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl
+++ b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl
@@ -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>.
#
@@ -1648,9 +1648,17 @@ sub scan_pkgsrc_distfiles_vs_distinfo($$$$) {
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 @@ sub scan_pkgsrc_distfiles_vs_distinfo($$$$) {
}
}
}
- 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
}