summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint4/files
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2019-10-06 10:46:18 +0000
committerrillig <rillig@pkgsrc.org>2019-10-06 10:46:18 +0000
commit25a00b28f0a0f6aa6ce2102ac05b9bec4f3ecf95 (patch)
tree96f3b2cc3afd166960af8fe7a391c439fb6e18a0 /pkgtools/pkglint4/files
parentaae86e2101e36e6de77cc2e07feff5f813cbb103 (diff)
downloadpkgsrc-25a00b28f0a0f6aa6ce2102ac05b9bec4f3ecf95.tar.gz
pkgtools/pkglint4: remove broken version check
The version number '4.193.0' had always been compared to the string 'pkglint4-4.193.0', which when interpreted as a version number, was: (16, 11, 7, 12, 9, 14, 20, 4, 0, 193, 0, 0). This was always greater than the (4, 0, 193, 0, 0).
Diffstat (limited to 'pkgtools/pkglint4/files')
-rw-r--r--pkgtools/pkglint4/files/pkglint.pl33
1 files changed, 1 insertions, 32 deletions
diff --git a/pkgtools/pkglint4/files/pkglint.pl b/pkgtools/pkglint4/files/pkglint.pl
index 8f40d923079..65feae37980 100644
--- a/pkgtools/pkglint4/files/pkglint.pl
+++ b/pkgtools/pkglint4/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.7 2019/10/06 10:33:34 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.8 2019/10/06 10:46:18 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1594,35 +1594,6 @@ sub get_nbpart() {
return "nb$pkgrevision";
}
-sub check_pkglint_version() {
- state $done = false;
- return if $done;
- $done = true;
-
- my $lines = load_lines("${cwd_pkgsrcdir}/pkgtools/pkglint4/Makefile", true);
- return unless $lines;
-
- my $pkglint_version = undef;
- foreach my $line (@{$lines}) {
- if ($line->text =~ regex_varassign) {
- my ($varname, undef, $value, undef) = ($1, $2, $3, $4);
-
- if ($varname eq "DISTNAME" || $varname eq "PKGNAME") {
- if ($value =~ regex_pkgname) {
- $pkglint_version = $2;
- }
- }
- }
- }
- return unless defined($pkglint_version);
-
- if (dewey_cmp($pkglint_version, ">", conf_distver)) {
- log_note(NO_FILE, NO_LINE_NUMBER, "A newer version of pkglint is available.");
- } elsif (dewey_cmp($pkglint_version, "<", conf_distver)) {
- log_error(NO_FILE, NO_LINE_NUMBER, "The pkglint version is newer than the tree to check.");
- }
-}
-
# When processing a file using the expect* subroutines below, it may
# happen that $lineno points past the end of the file. In that case,
# print the warning without associated source code.
@@ -5803,8 +5774,6 @@ sub checkitem($) {
return;
}
- check_pkglint_version(); # (needs $cwd_pkgsrcdir)
-
return if $is_dir && is_emptydir($item);
if ($is_dir) {