diff options
author | kris <kris@FreeBSD.org> | 2002-08-31 13:46:25 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2002-08-31 13:46:25 +0800 |
commit | 796ed5ebb6741e057003e81a5fd2f22a218d7f1c (patch) | |
tree | c6f70f5ea4ab3c0d3f7d56ea33569b8411d8b8cf /Tools | |
parent | 067a10c64dae8b0ff3423d863cdb23bb41bf7ce4 (diff) | |
download | freebsd-ports-graphics-796ed5ebb6741e057003e81a5fd2f22a218d7f1c.tar.gz freebsd-ports-graphics-796ed5ebb6741e057003e81a5fd2f22a218d7f1c.tar.zst freebsd-ports-graphics-796ed5ebb6741e057003e81a5fd2f22a218d7f1c.zip |
Check for duplicate entries in INDEX and warn about them.
Submitted by: Martin Heinen <martin@sumuk.de>
PR: ports/33196 (based on)
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/make_index | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Tools/make_index b/Tools/make_index index f2ba2895aa8..3708e94928d 100644 --- a/Tools/make_index +++ b/Tools/make_index @@ -114,11 +114,16 @@ foreach $name (keys %index) { # With all that done we're finally ready to write out the new # INDEX file one port at a time. foreach $name (@names) { - my $pkg = $index{$name}; - recurse($pkg); - print "$pkg->{text}|"; - print join(' ', sort(@{$pkg->{bdep}})) if @{$pkg->{bdep}}; - print "|"; - print join(' ', sort(@{$pkg->{rdep}})) if @{$pkg->{rdep}}; - print "|$pkg->{rest}\n"; + my $pkg = $index{$name}; + if (exists $pkg->{'PRINTED'}) { + print STDERR "Warning: Duplicate INDEX entry: $name\n"; + } else { + recurse($pkg); + print "$pkg->{text}|"; + print join(' ', sort(@{$pkg->{bdep}})) if @{$pkg->{bdep}}; + print "|"; + print join(' ', sort(@{$pkg->{rdep}})) if @{$pkg->{rdep}}; + print "|$pkg->{rest}\n"; + ++$pkg->{'PRINTED'}; + } } |