]> err.no Git - dpkg/commitdiff
Rename DSP::V1_0::native to DSP::V3_0::native
authorRaphael Hertzog <hertzog@debian.org>
Wed, 5 Mar 2008 23:09:08 +0000 (00:09 +0100)
committerRaphael Hertzog <hertzog@debian.org>
Wed, 5 Mar 2008 23:16:43 +0000 (00:16 +0100)
* 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.

scripts/Dpkg/Source/Package/V1_0.pm
scripts/Dpkg/Source/Package/V3_0/native.pm [moved from scripts/Dpkg/Source/Package/V1_0/native.pm with 96% similarity]
scripts/Makefile.am
scripts/dpkg-source.pl
scripts/po/POTFILES.in

index a4bd971f30e81d14a3b1dad96c8a653709974189..e61d7c87dcc1e83ba2a9881a3cecea0ec689e4d0 100644 (file)
@@ -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)) {
similarity index 96%
rename from scripts/Dpkg/Source/Package/V1_0/native.pm
rename to scripts/Dpkg/Source/Package/V3_0/native.pm
index 2b7c2c9cb7a44376e5706b5f7d942bf44822422e..bbc03ed0bdb4d02ef4b3d398b240a71d1d37df81 100644 (file)
@@ -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)";
     }
 }
 
index aac6e43f47e628e4c241a72b819e7e8dc20390ad..e520190980d7e3ab5ac73e077b90c39974fab7e4 100644 (file)
@@ -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
index c7902785b2e53e2601b978994ea2d69617ea0aea..aca14b05b066508633a5604e65110ab62d4d901c 100755 (executable)
@@ -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',
index 30ed975cc52c62a0c50045db3504b9b623675a39..ecdcc8a44bedab48634d3b9dd251f5b13e776f24 100644 (file)
@@ -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