pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Fixed a bug which led to an end...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f67278ee1083
branches:  trunk
changeset: 497897:f67278ee1083
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Aug 06 22:41:07 2005 +0000

description:
Fixed a bug which led to an endless loop. While happily changing the
code, I had forgotten one assumption I made. It was that in the ifelse
chain the case ( && ) couldn't occur because
the outer loop already cought that. And then I had inserted code that
violated exactly this assumption. Fixed.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r dfe53c857e4c -r f67278ee1083 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Aug 06 22:24:07 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Aug 06 22:41:07 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.234 2005/08/06 22:24:07 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.235 2005/08/06 22:41:07 rillig Exp $
 #
 # This version contains lots of changes necessary for NetBSD packages
 # done by:
@@ -2108,7 +2108,6 @@
 
                        } elsif ($is_wip && $line->text eq "") {
                                # ignore the special case "wip", which defines its own "index" target.
-                               $lines_atend = true;
 
                        } else {
                                $line->log_error("SUBDIR+= line expected.");
@@ -2133,7 +2132,7 @@
                        $fetch_next_line = true;
                }
 
-               if ($lines_index == $#{$lines} - 1) {
+               if ($lines_index == $#{$lines} - 1 || ($is_wip && $line->text eq "")) {
                        $lines_atend = true;
                }
                $filesys_atend = ($filesys_index == @filesys_subdirs);



Home | Main Index | Thread Index | Old Index