diff options
author | rillig <rillig@pkgsrc.org> | 2005-07-02 15:21:13 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-07-02 15:21:13 +0000 |
commit | 2b6133ab338caf959dca50c18f06e3b84096d4e6 (patch) | |
tree | 439eb2cab275a4917d5f62278a2b1f635381579d /pkgtools | |
parent | 982bb72f34fba34807e89e3789c2c35e3566aa31 (diff) | |
download | pkgsrc-2b6133ab338caf959dca50c18f06e3b84096d4e6.tar.gz |
The subroutine check_package gets the package directory as argument.
This is the first step to get rid of the global $opt_packagedir
variable. While doing this, I will hopefully notice all uses of relative
pathnames and repair them, so that pkglint can be called with multiple
arguments soon.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 9129aeba136..60919ec575f 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -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.198 2005/07/02 14:46:06 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.199 2005/07/02 15:21:13 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -370,7 +370,9 @@ sub checkfile_MESSAGE($); sub checkfile_patches_patch($); sub checkfile_PLIST($); sub checkfile_other($); + sub check_category($); +sub check_package($); sub checkperms($); sub readmakefile($$); @@ -378,7 +380,6 @@ sub checkextra($$); sub checkorder($$@); sub checkearlier($@); sub check_predefined_sites($); -sub check_package(); sub init_global_vars() { $pkgsrc_rootdir = undef; @@ -561,7 +562,7 @@ sub check_directory($) { load_make_vars_typemap(); } load_predefined_sites(); - check_package(); + check_package($opt_packagedir); } else { log_error($dir, NO_LINE_NUMBER, "Neither a package nor a category."); } @@ -580,7 +581,9 @@ sub main() { print_summary_and_exit($opt_quiet); } -sub check_package() { +sub check_package($) { + my ($dir) = @_; + # we need to handle the Makefile first to get some variables if (!checkfile_Makefile("Makefile")) { log_error("$opt_packagedir/Makefile", NO_LINE_NUMBER, "Cannot be read."); |