Просмотр исходного кода

Copy dir from backup if the file is empty as well.

Adam Heath лет назад: 24
Родитель
Сommit
6b77e05ab2
3 измененных файлов с 8 добавлено и 3 удалено
  1. 5 0
      ChangeLog
  2. 2 2
      debian/changelog
  3. 1 1
      scripts/install-info.pl

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Wed Nov 28 17:20:28 CST 2001 Adam Heath <doogie@debian.org>
+
+  * scripts/install-info.pl: Copy dir from backup if the file is empty
+    as well.
+
 Sat Nov 17 17:20:52 CET 2001 Wichert Akkerman <wakkerma@debian.org>
 
   * doc/sv/Makefile.in: install dpkg-query and dpkg-deb manpages

+ 2 - 2
debian/changelog

@@ -42,8 +42,8 @@ dpkg (1.10) unstable; urgency=low
     * Move /usr/info/dir to /usr/share/info/dir.  Closes: #67174.
     * If /usr/share/info doesn't exist, print a message saying so,
       instead of the confusing "couldn't lock" error.  Closes: #2531.
-    * If /usr/share/info/dir doesn't exist, try to copy the backup from
-      /var/backups/infodir.bak.
+    * If /usr/share/info/dir doesn't exist, or is empty, try to copy the
+      backup from /var/backups/infodir.bak.  Closes: #121309.
     * Add a --remove-exactly option, and allow for relative filenames.
       Closes: #92650.
     * Use the section from the .info file if --section is not given.

+ 1 - 1
scripts/install-info.pl

@@ -227,7 +227,7 @@ $name: unable to determine description for \`dir' entry - giving up
     }
 }
 
-if (!$nowrite && ! -e "$infodir/dir") {
+if (!$nowrite && ( ! -e "$infodir/dir" || ! -s "$infodir/dir" )) {
     if (-r $backup) {
 	print STDERR "$name: no file $infodir/dir, retrieving backup file $backup.\n";
 	if (system ("cp $backup $infodir/dir")) {