summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2005-09-06 10:30:00 +0000
committerrillig <rillig>2005-09-06 10:30:00 +0000
commit347bb0f310e00691241dad97abad5b5cb4f08c7d (patch)
tree1f67e015116a726a9bdee3cae0736987df1498fb /pkgtools
parente2b0c8e342ef3683b5498d4bbc3e752463151bd3 (diff)
downloadpkgsrc-347bb0f310e00691241dad97abad5b5cb4f08c7d.tar.gz
Bugfix: The subdirectories of the pkgsrc root directory are listed
correctly. With the -r option, the order of directories is now depth-first.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl23
1 files changed, 16 insertions, 7 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 628a713df85..9c98b01f7ac 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.281 2005/09/05 15:45:29 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.282 2005/09/06 10:30:00 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -2160,7 +2160,7 @@ sub check_predefined_sites($$) {
sub checkdir_root($) {
my ($dir) = @_;
my ($fname) = "${dir}/Makefile";
- my ($lines, $prev_subdir);
+ my ($lines, $prev_subdir, @subdirs);
log_subinfo("checkdir_root", $fname, NO_LINE_NUMBER, "Checking pkgsrc root directory.");
@@ -2185,7 +2185,7 @@ sub checkdir_root($) {
$line->log_warning("Indentation should be a single tab character.");
}
- if ($subdir =~ qr"\$" || !-f "${subdir}/Makefile") {
+ if ($subdir =~ qr"\$" || !-f "${dir}/${subdir}/Makefile") {
next;
}
@@ -2199,11 +2199,15 @@ sub checkdir_root($) {
$prev_subdir = $subdir;
- if ($opt_recursive && $comment_flag eq "") {
- push(@todo_dirs, "${dir}/${subdir}");
+ if ($comment_flag eq "") {
+ push(@subdirs, "${dir}/${subdir}");
}
}
}
+
+ if ($opt_recursive) {
+ push(@todo_dirs, @subdirs);
+ }
}
sub checkdir_category($) {
@@ -2313,6 +2317,7 @@ sub checkdir_category($) {
my ($f_index, $f_atend, $f_neednext, $f_current) = (0, false, true, undef, undef);
my ($m_index, $m_atend, $m_neednext, $m_current) = (0, false, true, undef, undef);
my ($line, $m_recurse);
+ my (@subdirs);
while (!($m_atend && $f_atend)) {
@@ -2357,8 +2362,8 @@ sub checkdir_category($) {
$f_neednext = true;
$m_neednext = true;
push(@normalized_lines, $line->text);
- if ($opt_recursive && $m_recurse) {
- push(@todo_dirs, "${dir}/${m_current}");
+ if ($m_recurse) {
+ push(@subdirs, "${dir}/${m_current}");
}
}
}
@@ -2414,6 +2419,10 @@ sub checkdir_category($) {
close(F) or die;
}
}
+
+ if ($opt_recursive) {
+ unshift(@todo_dirs, @subdirs);
+ }
}
sub checkdir_package($) {