Explorar el Código

dpkg-source: Don't use \b to match the end
of the version in filenames, use (?=[.-]) and (?=\.) instead.
\b doesn't work in case the version ends with ~.

Frank Lichtenheld hace 20 años
padre
commit
2f98cb7f73
Se han modificado 3 ficheros con 8 adiciones y 2 borrados
  1. 4 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 2 2
      scripts/dpkg-source.pl

+ 4 - 0
ChangeLog

@@ -6,6 +6,10 @@
 	not necessarily available for biarch builds). Instead
 	build an own representation of the search patch.
 
+	* scripts/dpkg-source.pl: Don't use \b to match the end
+	of the version in filenames, use (?=[.-]) and (?=\.) instead.
+	\b doesn't work in case the version ends with ~.
+
 2006-01-23  Guillem Jover  <guillem@debian.org>
 
 	Support for architecture wildcards.

+ 2 - 0
debian/changelog

@@ -33,6 +33,8 @@ dpkg (1.13.12~) unstable; urgency=low
     Closes: #332826
   * Let dpkg-source -b warn about special permissions of files added
     in the diff since these will get lost. Closes: #306125
+  * dpkg-source -x didn't work in case the upstream version or
+    the Debian version ended with ~. Fixed.
 
   [ Christian Perrier ]
   * Updated Translations:

+ 2 - 2
scripts/dpkg-source.pl

@@ -624,9 +624,9 @@ if ($opmode eq 'build') {
 	local $_ = $file;
 
 	&error("Files field contains invalid filename `$file'")
-	    unless s/^\Q$sourcepackage\E_\Q$baseversion\E\b// and
+	    unless s/^\Q$sourcepackage\E_\Q$baseversion\E(?=[.-])// and
 		   s/\.(gz|bz2)$//;
-	s/^-\Q$revision\E\b// if length $revision;
+	s/^-\Q$revision\E(?=\.)// if length $revision;
 
 	&error("repeated file type - files `$seen{$_}' and `$file'") if $seen{$_};
 	$seen{$_} = $file;