Received: by mail.netbsd.org (Postfix, from userid 605) id D2E1584FCF; Wed, 17 Aug 2022 18:51:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 0C67E84FD0 for ; Wed, 17 Aug 2022 18:51:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 2-Doi4zcdWZy for ; Wed, 17 Aug 2022 18:51:43 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 6268D84FCD for ; Wed, 17 Aug 2022 18:51:43 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 599FEFB1A; Wed, 17 Aug 2022 18:51:43 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1660762303285800" MIME-Version: 1.0 Date: Wed, 17 Aug 2022 18:51:43 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/pkgtools/lintpkgsrc/files To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20220817185143.599FEFB1A@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1660762303285800 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Wed Aug 17 18:51:43 UTC 2022 Modified Files: pkgsrc/pkgtools/lintpkgsrc/files: lintpkgsrc.pl Log Message: lintpkgsrc: cleanup: remove redundant punctuation around declarations To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1660762303285800 Content-Disposition: inline Content-Length: 3315 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl diff -u pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.117 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.118 --- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.117 Wed Aug 17 18:48:09 2022 +++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Wed Aug 17 18:51:43 2022 @@ -1,5 +1,5 @@ #!@PERL5@ -# $NetBSD: lintpkgsrc.pl,v 1.117 2022/08/17 18:48:09 rillig Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.118 2022/08/17 18:51:43 rillig Exp $ # Written by David Brownlee . # @@ -138,7 +138,7 @@ sub pkgs($self, $pkgbase = undef) { sub load($class, $fname) { open(STORE, '<', $fname) or die("Cannot read package data from $fname: $!\n"); - my ($pkgver); + my $pkgver; my $self = $class->new(); while (defined(my $line = )) { chomp($line); @@ -222,10 +222,9 @@ sub fail($msg) { #TODO this entire sub should be replaced with direct calls to # File::Find sub listdir($base, $dir = undef) { - my ($thisdir); my (@list, @thislist); - $thisdir = $base; + my $thisdir = $base; if (defined $dir) { $thisdir .= "/$dir"; $dir .= '/'; @@ -520,7 +519,7 @@ sub expand_modifiers($file, $varname, $l $to =~ s/\\(\d)/\$$1/g; # Change \1 etc to $1 $to =~ s/\&/\$&/g; - my ($notfirst); + my $notfirst; if ($global =~ s/1//) { # FIXME: The modifier '1' applies to the first # occurrence in any word, it doesn't have to @@ -725,9 +724,8 @@ sub get_default_makefile_vars() { $default_vars->{LOCALBASE} = $conf_pkgsrcdir; $default_vars->{X11BASE} = $conf_x11base; - my ($vars); if (-f $conf_makeconf && - ($vars = parse_makefile_vars($conf_makeconf, undef))) { + (my $vars = parse_makefile_vars($conf_makeconf, undef))) { foreach my $var (keys %$vars) { $default_vars->{$var} = $vars->{$var}; } @@ -977,7 +975,7 @@ sub parse_makefile_pkgsrc($file) { close(WTR) or die; my @errors = ; close(ERR) or die; - my ($makepkgname) = ; + my $makepkgname = ; close(RDR) or die; wait; chomp @errors; @@ -1159,9 +1157,9 @@ sub check_distinfo_hash($entry, $pkgpath # files in the packages. sub check_pkgsrc_distfiles_vs_distinfo($pkgsrcdir, $pkgdistdir, $check_unref, $check_distinfo) { - my (@categories); + my @categories; my (%distfiles, %sumfiles, @distwarn, $numpkg); - my (%unref_distfiles); + my %unref_distfiles; @categories = list_pkgsrc_categories($pkgsrcdir); @@ -1297,7 +1295,7 @@ sub check_prebuilt_packages() { $pkg = canonicalize_pkgname($pkg); if (my $pkgs = $pkgdata->pkgs($pkg)) { - my ($pkgver) = $pkgs->pkgver($ver); + my $pkgver = $pkgs->pkgver($ver); if (!defined $pkgver) { if ($opt{p}) { @@ -1328,7 +1326,7 @@ sub check_prebuilt_packages() { $prebuilt_pkgdir_cache{"$File::Find::dir/$_"} = 1; if (-l $_) { - my ($dest) = readlink($_); + my $dest = readlink($_); if (substr($dest, 0, 1) ne '/') { $dest = "$File::Find::dir/$dest"; @@ -1494,7 +1492,7 @@ sub list_prebuilt_packages($pkgsrcdir) { } sub list_packages_not_in_SUBDIR($pkgsrcdir) { - my (%in_subdir); + my %in_subdir; foreach my $cat (list_pkgsrc_categories($pkgsrcdir)) { my $makefile = "$pkgsrcdir/$cat/Makefile"; my $vars = parse_makefile_vars($makefile, undef); --_----------=_1660762303285800--