From 7641492283a5d90d03f9c8ccd21304ad857c7552 Mon Sep 17 00:00:00 2001 From: abs Date: Wed, 1 Oct 2003 11:56:17 +0000 Subject: Update pkglint to 3.63: perl 5.6.1 realpath() cannot handle files, only directories. Handle this case, with the only downside that if the last component in an include path is a symlink the 'performance boost' duplicate check may not work. Reported by Todd Vierling --- pkgtools/pkglint/Makefile | 4 ++-- pkgtools/pkglint/files/lintpkgsrc.pl | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index c4f125fe06f..29b706ac101 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.169 2003/09/30 16:09:50 abs Exp $ +# $NetBSD: Makefile,v 1.170 2003/10/01 11:56:17 abs Exp $ # -DISTNAME= pkglint-3.62 +DISTNAME= pkglint-3.63 WRKSRC= ${WRKDIR} CATEGORIES= pkgtools devel MASTER_SITES= # empty diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl index e0d4e65b7ce..3a681128b5a 100755 --- a/pkgtools/pkglint/files/lintpkgsrc.pl +++ b/pkgtools/pkglint/files/lintpkgsrc.pl @@ -1,6 +1,6 @@ #!@PREFIX@/bin/perl -# $NetBSD: lintpkgsrc.pl,v 1.83 2003/09/30 16:09:50 abs Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.84 2003/10/01 11:56:17 abs Exp $ # Written by David Brownlee . # @@ -886,7 +886,12 @@ sub parse_makefile_vars if (substr($incfile, 0, 1) ne '/') { $incfile = "$CURDIR/$incfile"; } - $incfile = realpath($incfile); + # perl 5.6.1 realpath() cannot handle files, only directories + # If the last component is a symlink this will give a false + # negative, but that is not a problem as the duplicate check + # is for performance + $incfile =~ m#^(.+)(/[^/]+)$#; + $incfile = realpath($1).$2; if (!$incfiles{$incfile}) { -- cgit v1.2.3