+Sat Sep 13 14:24:14 CDT 2003 Adam Heath <doogie@debian.org>
+
+ * scripts/install-info.pl: Apply patch, to handle missing infodir.bak,
+ and empty files.
+
Sat Sep 13 14:21:13 CDT 2003 Adam Heath <doogie@debian.org>
* config.sub, config.guess: Updated
* Add build-depends on sgml-base, and increase gettext build-depends to
0.12.1-3.
* Updated config.sub and config.guess in cvs.
+ * Frank Lichtenheld <frank@lichtenheld.de>:
+ Apply patch, to handle missing infodir.bak, and empty files. Closes:
+ #196361
-- Wichert Akkerman <debian@extern.wiggy.net> UNRELEASED
$maxwidth=79;
$Text::Wrap::columns=$maxwidth;
$backup='/var/backups/infodir.bak';
+$default='/usr/share/base-files/info.dir';
$menuentry="";
$description="";
exit 1;
}
} else {
- print STDERR "$name: no backup file $backup available, giving up.\n";
+ if (-r $default) {
+ print STDERR "$name: no backup file $backup available, retrieving default file.\n";
+
+ if (system("cp $default $infodir/dir")) {
+ print STDERR "$name: copying $default to $infodir/dir failed, giving up: $!\n";
exit 1;
}
+ } else {
+ print STDERR "$name: no backup file $backup available.\n";
+ print STDERR "$name: no default file $default available, giving up.\n";
+ exit 1;
+ }
+ }
}
if (!$nowrite && !link("$infodir/dir","$infodir/dir.lock")) {
@work= <OLD>;
eof(OLD) || &ulquit("read $infodir/dir: $!");
close(OLD) || &ulquit("close $infodir/dir after read: $!");
-while ($work[$#work] !~ m/\S/) { $#work--; }
+while ($work[$#work] !~ m/\S/) { $#work--; last unless $#work; }
while (@work) {
$_= shift(@work);