pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/pkglint4/files



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun Oct  6 10:46:18 UTC 2019

Modified Files:
        pkgsrc/pkgtools/pkglint4/files: pkglint.pl

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/pkgtools/pkglint4/files/pkglint.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/pkglint4/files/pkglint.pl
diff -u pkgsrc/pkgtools/pkglint4/files/pkglint.pl:1.7 pkgsrc/pkgtools/pkglint4/files/pkglint.pl:1.8
--- pkgsrc/pkgtools/pkglint4/files/pkglint.pl:1.7       Sun Oct  6 10:33:34 2019
+++ pkgsrc/pkgtools/pkglint4/files/pkglint.pl   Sun Oct  6 10:46:18 2019
@@ -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) {



Home | Main Index | Thread Index | Old Index