--- fix-db.pl 2003/10/04 15:24:25 1.1 +++ fix-db.pl 2003/10/04 15:30:40 @@ -34,8 +34,13 @@ foreach $ebuild_file (@ebuild_files) { - open(CONTENTS, '/var/db/pkg/' . $ebuild_file . '/CONTENTS') or - fatal_error('couldn\'t open /var/db/pkg/' . $ebuild_file . '/CONTENTS: ' . $!); + my $contents_file = '/var/db/pkg/' . $ebuild_file . '/CONTENTS'; + if (-e $contents_file and -z $contents_file){ + print "skipping $contents_file - zero length\n"; + next; + } + open(CONTENTS, $contents_file) or + fatal_error("couldn't open $contents_file: $!"); @contents = ; close(CONTENTS);