Received: by mail.netbsd.org (Postfix, from userid 605) id CB11884E91; Sat, 13 Aug 2022 10:41:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 0DBD284CFC for ; Sat, 13 Aug 2022 10:41:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 2JPRiH8CcqxB for ; Sat, 13 Aug 2022 10:41:22 +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 6B44D84CFA for ; Sat, 13 Aug 2022 10:41:22 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 5AA48FB1A; Sat, 13 Aug 2022 10:41:22 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_166038728235420" MIME-Version: 1.0 Date: Sat, 13 Aug 2022 10:41:22 +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: <20220813104122.5AA48FB1A@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_166038728235420 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Sat Aug 13 10:41:21 UTC 2022 Modified Files: pkgsrc/pkgtools/lintpkgsrc/files: lintpkgsrc.pl Log Message: lintpkgsrc: remove extra code for determining the pkg_install version There is no apparent reason for this code. Lintpkgsrc could already parse the version of pkg_install, by falling back to running bmake. When run in debug mode, 'lintpkgsrc -D .' failed because lintpkgsrc used a wrong regular expression instead of just calling dirname. While here, fix the variable name 'pkgsrcdir' to simply 'pkgdir', as the previous name was highly confusing. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 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. --_----------=_166038728235420 Content-Disposition: inline Content-Length: 2099 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.83 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.84 --- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.83 Sat Aug 13 10:23:40 2022 +++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Sat Aug 13 10:41:21 2022 @@ -1,6 +1,6 @@ #!@PERL5@ -# $NetBSD: lintpkgsrc.pl,v 1.83 2022/08/13 10:23:40 rillig Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.84 2022/08/13 10:41:21 rillig Exp $ # Written by David Brownlee . # @@ -150,7 +150,6 @@ my $conf_x11base = '@X11BASE@'; my ( $pkgdb, # Database of pkgsrc packages - $pkg_installver, # Installed version of pkg_install pseudo-pkg $default_vars, # Set for Makefiles, inc PACKAGES & PKGSRCDIR %opt, # Command line options @matched_prebuiltpackages, # List of obsolete prebuilt package paths @@ -624,8 +623,6 @@ sub parse_makefile_vars($file, $cwd = un sub get_default_makefile_vars() { - chomp($pkg_installver = `$conf_pkg_info -V 2>/dev/null || echo 20010302`); - chomp($_ = `uname -srm`); ( $default_vars->{OPSYS}, @@ -944,10 +941,10 @@ sub parse_makefile_pkgsrc($file) { if (!defined $pkgname || $pkgname =~ /\$/ || $pkgname !~ /(.*)-(\d.*)/) { # invoke make here as a last resort - my ($pkgsrcdir) = ($file =~ m:(/.*)/:); - debug("Running '$conf_make' in '$pkgsrcdir'\n"); + my $pkgdir = dirname $file; + debug("Running '$conf_make' in '$pkgdir'\n"); my $pid = open3(\*WTR, \*RDR, \*ERR, - "cd $pkgsrcdir || exit 1; $conf_make show-vars VARNAMES=PKGNAME"); + "cd $pkgdir || exit 1; $conf_make show-vars VARNAMES=PKGNAME"); if (!$pid) { warn "$file: Unable to run make: $!"; } else { @@ -967,10 +964,6 @@ sub parse_makefile_pkgsrc($file) { } if (defined $pkgname) { - if ($pkgname =~ /^pkg_install-(\d+)$/ && $1 < $pkg_installver) { - $pkgname = "pkg_install-$pkg_installver"; - } - $pkgname = canonicalize_pkgname($pkgname); if (defined $vars->{PKGREVISION} --_----------=_166038728235420--