summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/lintpkgsrc.pl
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools/pkglint/files/lintpkgsrc.pl')
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl9
1 files changed, 7 insertions, 2 deletions
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 <abs@netbsd.org>.
#
@@ -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})
{