pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Renamed -Wexpensive to -Wbl3. B...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c51ed72a5dbd
branches:  trunk
changeset: 494608:c51ed72a5dbd
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu May 26 07:07:00 2005 +0000

description:
Renamed -Wexpensive to -Wbl3. By default this option is enabled. Added a
subroutine checkfile_buildlink3_mk that performs the basic Makefile
checks on buildlink3.mk, if it exists.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diffs (73 lines):

diff -r 570b54063ed8 -r c51ed72a5dbd pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Thu May 26 06:50:09 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Thu May 26 07:07:00 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.187 2005/05/26 06:50:09 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.188 2005/05/26 07:07:00 rillig Exp $
 #
 # This version contains lots of changes necessary for NetBSD packages
 # done by:
@@ -300,14 +300,14 @@
 
 my $opt_check_distinfo = true;
 my $opt_check_extra    = true;
-my $opt_check_expensive        = false;
+my $opt_check_bl3      = true;
 my $opt_check_MESSAGE  = true;
 my $opt_check_patches  = true;
 my $opt_check_PLIST    = true;
 my $opt_check_newpkg   = false;
 my (%checks) = (
        "distinfo"      => [\$opt_check_distinfo, "check distinfo file"],
-       "expensive"     => [\$opt_check_expensive, "enable warnings that may require much time"],
+       "bl3"           => [\$opt_check_bl3, "check buildlink3 files"],
        "extra"         => [\$opt_check_extra, "check various additional files"],
        "MESSAGE"       => [\$opt_check_MESSAGE, "check MESSAGE files"],
        "patches"       => [\$opt_check_patches, "check patches"],
@@ -634,6 +634,12 @@
                        log_warning("$opt_packagedir/$distinfo_file", NO_LINE_NUMBER, "File not found. Please run '$conf_make makepatchsum'.");
                }
        }
+       if ($opt_check_bl3) {
+               foreach my $bl3 ("$opt_packagedir/$pkgdir/buildlink3.mk") {
+                       next unless -f $bl3;
+                       checkfile_buildlink3_mk($bl3);
+               }
+       }
        if ($opt_check_extra) {
                foreach my $abs_extra ((<$opt_packagedir/$filesdir/*>, <$opt_packagedir/$pkgdir/*>)) {
                        my ($extra) = (substr($abs_extra, length("$opt_packagedir/")));
@@ -963,6 +969,21 @@
        return true;
 }
 
+sub checkfile_buildlink3_mk($) {
+       my ($file) = @_;
+       my ($fname) = ("$opt_packagedir/$file");
+       my ($lines);
+
+       if (!($lines = load_file($fname))) {
+               log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
+               return false;
+       }
+       checklines_deprecated_variables($lines);
+       checklines_trailing_empty_lines($lines);
+       checklines_direct_tools($lines);
+       return true;
+}
+
 sub checkperms($) {
        my ($file) = @_;
 
@@ -1100,7 +1121,7 @@
                                $contents .= "### pkglint ### skipped $includefile\n";
                                next;
                        }
-                       if (!$opt_check_expensive && $includefile =~ qr"/buildlink3.mk$") {
+                       if (!$opt_check_bl3 && $includefile =~ qr"/buildlink3.mk$") {
                                $contents .= "### pkglint ### skipped $includefile\n";
                                next;
                        }



Home | Main Index | Thread Index | Old Index