The following commit has been merged in the sourcev3 branch:
commit e8017dbfa96f27804f8283beda6b09dbb25b8829
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date:   Thu Mar 6 00:09:08 2008 +0100

    Rename DSP::V1_0::native to DSP::V3_0::native
    
    * scripts/Dpkg/Source/Package/V1_0/native.pm: This file got
    renamed into...
    * scripts/Dpkg/Source/Package/V3_0/native.pm: The goal is to
    not pollute the namespace of versions 1.0 and 2.0. The usage
    of the format specifier between parenthesis is thus limited
    to version 3.0.
    * scripts/dpkg-source.pl: Updated to take into account the
    previous renaming.
    * scripts/Dpkg/Source/Package/V1_0.pm: Adapt to the name change
    and two small bug fixes that affect building of native packages.
    * scripts/Makefile.am, scripts/po/POTFILES.in: Register the new
    file and remove the old one.

diff --git a/scripts/Dpkg/Source/Package/V1_0.pm 
b/scripts/Dpkg/Source/Package/V1_0.pm
index a4bd971..e61d7c8 100644
--- a/scripts/Dpkg/Source/Package/V1_0.pm
+++ b/scripts/Dpkg/Source/Package/V1_0.pm
@@ -30,7 +30,7 @@ use Dpkg::Source::Patch;
 use Dpkg::Version qw(check_version);
 use Dpkg::Exit;
 use Dpkg::Source::Functions qw(erasedir);
-use Dpkg::Source::Package::V1_0::native;
+use Dpkg::Source::Package::V3_0::native;
 use Dpkg::Path qw(check_files_are_the_same);
 
 use POSIX;
@@ -73,11 +73,11 @@ sub do_extract {
     my $native = $difffile ? 0 : 1;
     if ($native and ($tarfile =~ /\.orig\.tar\.gz$/)) {
         warning(_g("native package with .orig.tar"));
-        $native = 0; # V1_0::native doesn't handle orig.tar
+        $native = 0; # V3_0::native doesn't handle orig.tar
     }
 
     if ($native) {
-        Dpkg::Source::Package::V1_0::native::do_extract($self, $newdirectory);
+        Dpkg::Source::Package::V3_0::native::do_extract($self, $newdirectory);
     } else {
         my $expectprefix = $newdirectory;
         $expectprefix .= '.orig';
@@ -254,7 +254,7 @@ sub do_build {
     }
 
     if ($sourcestyle eq "n") {
-        Dpkg::Source::Package::V1_0::native::build($self, $dir);
+        Dpkg::Source::Package::V3_0::native::do_build($self, $dir);
     } elsif ($sourcestyle =~ m/[nurUR]/) {
         if (stat($tarname)) {
             unless ($sourcestyle =~ m/[nUR]/) {
@@ -286,7 +286,7 @@ sub do_build {
             $sourcepackage, $tarname);
     }
 
-    $self->add_file($tarname);
+    $self->add_file($tarname) if $tarname;
 
     if ($sourcestyle =~ m/[kpKP]/) {
         if (stat($origdir)) {
diff --git a/scripts/Dpkg/Source/Package/V1_0/native.pm 
b/scripts/Dpkg/Source/Package/V3_0/native.pm
similarity index 96%
rename from scripts/Dpkg/Source/Package/V1_0/native.pm
rename to scripts/Dpkg/Source/Package/V3_0/native.pm
index 2b7c2c9..bbc03ed 100644
--- a/scripts/Dpkg/Source/Package/V1_0/native.pm
+++ b/scripts/Dpkg/Source/Package/V3_0/native.pm
@@ -14,7 +14,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-package Dpkg::Source::Package::V1_0::native;
+package Dpkg::Source::Package::V3_0::native;
 
 use strict;
 use warnings;
@@ -89,10 +89,9 @@ sub do_build {
 
     $self->add_file($tarname);
 
+    # For backward compatibility, drop version to 1.0 if we can
     if ($self->{'options'}{'compression'} eq "gzip") {
         $self->{'fields'}{'Format'} = "1.0";
-    } else {
-        $self->{'fields'}{'Format'} = "1.0 (native)";
     }
 }
 
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index aac6e43..e520190 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -112,8 +112,8 @@ nobase_dist_perllib_DATA = \
        Dpkg/Source/Functions.pm \
        Dpkg/Source/Package.pm \
        Dpkg/Source/Package/V1_0.pm \
-       Dpkg/Source/Package/V1_0/native.pm \
        Dpkg/Source/Package/V2_0.pm \
+       Dpkg/Source/Package/V3_0/native.pm \
        Dpkg/Source/Package/V3_0/git.pm \
        Dpkg/Source/Patch.pm \
        Dpkg.pm
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index c790278..aca14b0 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -82,7 +82,7 @@ _darcs
 {arch}
 );
 
-my @build_formats = ("1.0", "1.0 (native)");
+my @build_formats = ("1.0", "3.0 (native)");
 my %options = (
     # Compression related
     compression => 'gzip',
diff --git a/scripts/po/POTFILES.in b/scripts/po/POTFILES.in
index 30ed975..ecdcc8a 100644
--- a/scripts/po/POTFILES.in
+++ b/scripts/po/POTFILES.in
@@ -34,8 +34,8 @@ scripts/Dpkg/Source/Functions.pm
 scripts/Dpkg/Source/Patch.pm
 scripts/Dpkg/Source/Package.pm
 scripts/Dpkg/Source/Package/V1_0.pm
-scripts/Dpkg/Source/Package/V1_0/native.pm
 scripts/Dpkg/Source/Package/V2_0.pm
+scripts/Dpkg/Source/Package/V3_0/native.pm
 scripts/Dpkg/Source/Package/V3_0/git.pm
 scripts/Dpkg/Substvars.pm
 scripts/Dpkg/Vars.pm

-- 
dpkg's main repository


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

Reply via email to