pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Updated pkglint to 4.45.
details: https://anonhg.NetBSD.org/pkgsrc/rev/4e5864e0a918
branches: trunk
changeset: 503488:4e5864e0a918
user: rillig <rillig%pkgsrc.org@localhost>
date: Mon Nov 21 22:06:30 2005 +0000
description:
Updated pkglint to 4.45.
- Fixed perl -T warnings:
- Replaced $#{@{$lines}} with $#{$lines}.
- Avoided calls to external programs (sed and digest).
- Removed redundant warning if DISTNAME is set to an invalid package name
and PKGNAME is not defined.
- Changed dependency from pkgtools/digest to security/p5-Digest-SHA1.
diffstat:
doc/CHANGES | 3 ++-
pkgtools/pkglint/Makefile | 8 ++++----
pkgtools/pkglint/files/pkglint.pl | 20 ++++++++++----------
3 files changed, 16 insertions(+), 15 deletions(-)
diffs (96 lines):
diff -r c9c0823479cd -r 4e5864e0a918 doc/CHANGES
--- a/doc/CHANGES Mon Nov 21 19:46:46 2005 +0000
+++ b/doc/CHANGES Mon Nov 21 22:06:30 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.11998 2005/11/21 19:46:46 minskim Exp $
+$NetBSD: CHANGES,v 1.11999 2005/11/21 22:12:53 rillig Exp $
Changes to the packages collection and infrastructure in 2005:
@@ -5303,3 +5303,4 @@
Updated security/audit-packages to 1.41 [agc 2005-11-21]
Updated databases/phpmyadmin to 2.6.4pl4 [tron 2005-11-21]
Added net/synergy version 1.2.4 [minskim 2005-11-21]
+ Updated pkgtools/pkglint to 4.45 [rillig 2005-11-21]
diff -r c9c0823479cd -r 4e5864e0a918 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Mon Nov 21 19:46:46 2005 +0000
+++ b/pkgtools/pkglint/Makefile Mon Nov 21 22:06:30 2005 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.304 2005/11/20 20:09:35 rillig Exp $
+# $NetBSD: Makefile,v 1.305 2005/11/21 22:06:30 rillig Exp $
#
-DISTNAME= pkglint-4.44
-CATEGORIES= pkgtools devel
+DISTNAME= pkglint-4.45
+CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
@@ -10,7 +10,7 @@
HOMEPAGE= http://www.netbsd.org/Documentation/pkgsrc/
COMMENT= Verifier for NetBSD packages and complete pkgsrc tree
-DEPENDS+= digest>=20010101:../../pkgtools/digest
+DEPENDS+= p5-Digest-SHA1-[0-9]*:../../security/p5-Digest-SHA1
PKG_INSTALLATION_TYPES= overwrite pkgviews
diff -r c9c0823479cd -r 4e5864e0a918 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Mon Nov 21 19:46:46 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Mon Nov 21 22:06:30 2005 +0000
@@ -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.375 2005/11/21 07:24:51 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.376 2005/11/21 22:06:30 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -435,7 +435,7 @@
}
}
- if ($lineno > $#{@{$lines}}) {
+ if ($lineno > $#{$lines}) {
# The last line in the file is a continuation line
$lineno--;
}
@@ -561,6 +561,7 @@
use strict;
use warnings;
+use Digest::SHA1;
use Getopt::Long qw(:config no_ignore_case bundling require_order);
use Fcntl qw(:mode);
use File::Basename;
@@ -1147,11 +1148,13 @@
my ($alg, $file, $sum) = ($1, $2, $3);
if ($file =~ /^patch-[A-Za-z0-9]+$/) {
- if (-f "${current_dir}/${patchdir}/${file}") {
- open(DIG, "sed '/\\\$NetBSD.*/d' ${current_dir}/${patchdir}/${file} | digest ${alg} |") or die;
- my $chksum = <DIG>;
- close(DIG);
- chomp($chksum);
+ if (open(PATCH, "< ${current_dir}/${patchdir}/${file}")) {
+ my $data = "";
+ foreach my $patchline (<PATCH>) {
+ $data .= $patchline unless $patchline =~ qr"\$NetBSD.*\$";
+ }
+ close(PATCH);
+ my $chksum = Digest::SHA1::sha1_hex($data);
if ($sum ne $chksum) {
$line->log_error("${alg} checksum of $file differs (expected ${sum}, got ${chksum}). Rerun '".conf_make." makepatchsum'.");
}
@@ -2588,9 +2591,6 @@
if (defined($pkgname) && defined($distname) && ($pkgname eq $distname || $pkgname eq "\${DISTNAME}")) {
log_warning($fname, NO_LINE_NUMBER, "PKGNAME is \${DISTNAME} by default. You don't need to define PKGNAME.");
}
- if (defined($pkgname) && $pkgname !~ regex_unresolved && $pkgname !~ regex_pkgname) {
- log_warning($fname, NO_LINE_NUMBER, "PKGNAME should have the form packagename-version, where version consists only of digits, letters and dots.");
- }
if (!defined($pkgname) && defined($distname) && $distname !~ regex_unresolved && $distname !~ regex_pkgname) {
log_warning($fname, NO_LINE_NUMBER, "As DISTNAME ist not a valid package name, please define the PKGNAME explicitly.");
Home |
Main Index |
Thread Index |
Old Index