pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Bugfix: The subdirectories of t...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a28055610a19
branches: trunk
changeset: 498952:a28055610a19
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue Sep 06 10:30:00 2005 +0000
description:
Bugfix: The subdirectories of the pkgsrc root directory are listed
correctly. With the -r option, the order of directories is now
depth-first.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diffs (78 lines):
diff -r 93e9944169d5 -r a28055610a19 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue Sep 06 08:55:39 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue Sep 06 10:30:00 2005 +0000
@@ -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 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 @@
$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 @@
$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 @@
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 @@
$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 @@
close(F) or die;
}
}
+
+ if ($opt_recursive) {
+ unshift(@todo_dirs, @subdirs);
+ }
}
sub checkdir_package($) {
Home |
Main Index |
Thread Index |
Old Index