The branch, master has been updated
       via  1073aae7127d1912acbebbcc6dfd3379b1b06d74 (commit)
      from  0a3f6436bcdfed21e7edc0c1c8c60322b590298b (commit)


- Shortlog ------------------------------------------------------------
1073aae dpkg-source: fix regex used to identify extension of .orig tarball

Summary of changes:
 ChangeLog              |    2 ++
 debian/changelog       |    3 +++
 scripts/dpkg-source.pl |    6 ++++--
 3 files changed, 9 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 1073aae7127d1912acbebbcc6dfd3379b1b06d74
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date:   Thu Nov 22 18:35:34 2007 +0100

    dpkg-source: fix regex used to identify extension of .orig tarball
    
    Regex special meta-characters (mainly like "+" in versions) embedded in 
$basename
    made the regex fail which resulted in unwanted upgrade of source packages to
    Format: 2.0.

diff --git a/ChangeLog b/ChangeLog
index 42e0c4c..fc4bb34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@
        at the beginning of the list of path to search, even if they
        are already listed (one might want to use LD_LIBRARY_PATH to
        change the search order).
+       * scripts/dpkg-source.pl: Fix regex used to identify the extension
+       of the orig.tar.{gz,bz2,lzma} file.
 
 2007-11-21  Raphael Hertzog  <[EMAIL PROTECTED]>
 
diff --git a/debian/changelog b/debian/changelog
index 5b14a49..6b64d0f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,9 @@ dpkg (1.14.10) UNRELEASED; urgency=low
   * dpkg-shlibdeps will try harder to identify packages providing a library
     by looking up dpkg -S on the realpath of any symlink to a library.
     Closes: #452339
+  * dpkg-source now correctly identifies the extension of the
+    orig.tar.{gz,bz2,lzma} file and won't unexpectedly create "Format: 2.0"
+    .dsc files.
 
   [ Updated man pages translations ]
   * Swedish (Peter Karlsson)
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index b82b9d1..94589c6 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -502,11 +502,13 @@ if ($opmode eq 'build') {
         $tardirbase= $origdirbase; $tardirname= $origdirname;
 
        $tarname= $origtargz || "$basename.orig.tar.$comp_ext";
-       $tarname =~ /$basename.orig.tar.($comp_regex)/ ||
+       if ($tarname =~ /\Q$basename\E\.orig\.tar\.($comp_regex)/) {
+           if (($1 ne 'gz') && ($f{'Format'} < 2)) { $f{'Format'} = '2.0' };
+       } else {
            warning(_g(".orig.tar name %s is not <package>_<upstreamversion>" .
                       ".orig.tar (wanted %s)"),
                    $tarname, "$basename.orig.tar.$comp_regex");
-       if (($1 ne 'gz') && ($f{'Format'} < 2)) { $f{'Format'} = '2.0' };
+       }
     } else {
        $tardirbase= $dirbase; $tardirname= $dirname;
        $tarname= "$basenamerev.tar.$comp_ext";

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to