Sfoglia il codice sorgente

install-info: Improve error message when the file doesn't exist

Raphael Hertzog 18 anni fa
parent
commit
36f5254656
3 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  1. 5 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 3 1
      scripts/install-info.pl

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-06-27  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/install-info.pl: Improve error message when the
+	info file doesn't exist.
+
 2008-06-23  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/dpkg-source.pl: New option --require-valid-signature.

+ 2 - 0
debian/changelog

@@ -56,6 +56,8 @@ dpkg (1.15.0) UNRELEASED; urgency=low
   * Add new option --require-valid-signature to dpkg-source. Closes: #390282
   * In dpkg-query(1) document the origin of the various fields and warn that
     they are not always available. Closes: #488293
+  * Improve error message in install-info when the file doesn't exist.
+    Thanks to Thomas Hood <jdthood@yahoo.co.uk>. Closes: #107098
 
   [ Pierre Habouzit ]
   * Add a --query option to update-alternatives. Closes: #336091, #441904

+ 3 - 1
scripts/install-info.pl

@@ -156,8 +156,10 @@ if (!$remove) {
 
     if (!-f $filename && -f "$filename.gz" || $filename =~ s/\.gz$//) {
         $filename= "gzip -cd <$filename.gz |";  $pipeit= 1;
-    } else {
+    } elsif (-f $filename) {
         $filename= "< $filename";
+    } else {
+        die "$progname: File $filename not found\n";
     }
 
     if (!length($description)) {