Skip to content

Commit

Permalink
- In resolve_relative_path(), PKGSRCDIR is replaced with $pkgsrcdir.
Browse files Browse the repository at this point in the history
- In checkline_relative_path(), an info message is generated if a filename
  could not be resolved completely.
  • Loading branch information
rillig committed Dec 1, 2005
1 parent b7b6984 commit 04603d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkgtools/pkglint/files/pkglint.pl
Expand Up @@ -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.405 2005/12/01 15:21:56 rillig Exp $
# $NetBSD: pkglint.pl,v 1.406 2005/12/01 16:11:27 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
Expand Down Expand Up @@ -1082,6 +1082,7 @@ ($)
sub resolve_relative_path($) {
my ($relpath) = @_;

$relpath =~ s,\$\{PKGSRCDIR\},$pkgsrcdir,;
$relpath =~ s,\$\{\.CURDIR\},.,;
$relpath =~ s,\$\{PHPPKGSRCDIR\},../../lang/php5,;
$relpath =~ s,\$\{SUSE_DIR_PREFIX\},suse91,;
Expand Down Expand Up @@ -1168,7 +1169,9 @@ ($$)
$line->log_error("A pkgsrc package must not depend on any outside package.");
}
$path = resolve_relative_path($path);
if ($path !~ regex_unresolved && !-e "${current_dir}/${path}") {
if ($path =~ regex_unresolved) {
$line->log_info("Unresolved path: \"${path}\".");
} elsif (!-e "${current_dir}/${path}") {
$line->log_error("\"${path}\" does not exist.");
}
}
Expand Down

0 comments on commit 04603d6

Please sign in to comment.