Ver código fonte

dpkg-gensymbols: output a warning when a pattern doesn't match any file

Raphaël Hertzog 14 anos atrás
pai
commit
d3b995a4d9
2 arquivos alterados com 7 adições e 1 exclusões
  1. 3 0
      debian/changelog
  2. 4 1
      scripts/dpkg-gensymbols.pl

+ 3 - 0
debian/changelog

@@ -45,6 +45,9 @@ dpkg (1.16.2) UNRELEASED; urgency=low
     updates. Closes: #642608
     Add libfile-fcntllock-perl to dpkg-dev's Depends since we use this module
     to handle the locking.
+  * Update dpkg-gensymbols(1) to clarify that -e accepts shell patterns
+    expansions and not regular expressions. And let dpkg-gensymbols output a
+    warning when a pattern doesn't match any file. Closes: #649248
 
   [ Jonathan Nieder ]
   * Bump po4a version in Build-Depends to 0.41, since earlier versions do

+ 4 - 1
scripts/dpkg-gensymbols.pl

@@ -112,7 +112,10 @@ while (@ARGV) {
 	if (-e $file) {
 	    push @files, $file;
 	} else {
-	    push @files, glob($file);
+	    my @to_add = glob($file);
+	    push @files, @to_add;
+	    warning(_g("pattern '%s' did not match any file"), $file)
+		unless scalar(@to_add);
 	}
     } elsif (m/^-p(.*)/) {
 	error(_g("Illegal package name \`%s'"), $1);