Bladeren bron

dpkg-source: add option --skip-patches

* scripts/Dpkg/Source/Package/V2_0.pm: Add the option
--skip-patches to not apply patches at the end of the source
package extraction. Also works for Format: 3.0 (quilt).
* man/dpkg-source.1: Document the above change.
Raphael Hertzog 18 jaren geleden
bovenliggende
commit
88bf860ca3
4 gewijzigde bestanden met toevoegingen van 20 en 1 verwijderingen
  1. 7 0
      ChangeLog
  2. 3 0
      debian/changelog
  3. 3 0
      man/dpkg-source.1
  4. 7 1
      scripts/Dpkg/Source/Package/V2_0.pm

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2008-04-01  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/Dpkg/Source/Package/V2_0.pm: Add the option
+	--skip-patches to not apply patches at the end of the source
+	package extraction. Also works for Format: 3.0 (quilt).
+	* man/dpkg-source.1: Document the above change.
+
 2008-04-01  Raphael Hertzog  <hertzog@debian.org>
 2008-04-01  Raphael Hertzog  <hertzog@debian.org>
 
 
 	* scripts/Dpkg/Source/Package/V2_0.pm (do_extract): Create
 	* scripts/Dpkg/Source/Package/V2_0.pm (do_extract): Create

+ 3 - 0
debian/changelog

@@ -13,6 +13,9 @@ dpkg (1.14.18) UNRELEASED; urgency=low
     debian tarball. This enables on-the-fly conversion of source packages from
     debian tarball. This enables on-the-fly conversion of source packages from
     Format: 1.0 to Format: 3.0 (quilt) without manual intervention of the
     Format: 1.0 to Format: 3.0 (quilt) without manual intervention of the
     user. This feature can be disabled with the option --no-preparation.
     user. This feature can be disabled with the option --no-preparation.
+  * The dpkg-source option --skip-patches disables application of patches
+    during extraction of source packages using Format: 2.0 or Format: 3.0
+    (quilt).
 
 
   [ Updated dselect translations ]
   [ Updated dselect translations ]
   * German. (Sven Joachim).
   * German. (Sven Joachim).

+ 3 - 0
man/dpkg-source.1

@@ -413,6 +413,9 @@ apparently unapplied.
 .PP
 .PP
 .B Extract options
 .B Extract options
 .TP
 .TP
+.B \-\-skip\-patches
+Do not apply patches at the end of the extraction.
+.TP
 .B \-\-without\-quilt
 .B \-\-without\-quilt
 Don't use quilt to apply patches but dpkg-source's own code. It won't be
 Don't use quilt to apply patches but dpkg-source's own code. It won't be
 possible to use quilt directly on the unpacked directory but it will be
 possible to use quilt directly on the unpacked directory but it will be

+ 7 - 1
scripts/Dpkg/Source/Package/V2_0.pm

@@ -49,6 +49,9 @@ sub init_options {
         unless exists $self->{'options'}{'include_binaries'};
         unless exists $self->{'options'}{'include_binaries'};
     $self->{'options'}{'preparation'} = 1
     $self->{'options'}{'preparation'} = 1
         unless exists $self->{'options'}{'preparation'};
         unless exists $self->{'options'}{'preparation'};
+    $self->{'options'}{'skip_patches'} = 0
+        unless exists $self->{'options'}{'skip_patches'};
+
 }
 }
 
 
 sub parse_cmdline_option {
 sub parse_cmdline_option {
@@ -65,6 +68,9 @@ sub parse_cmdline_option {
     } elsif ($opt =~ /^--no-preparation$/) {
     } elsif ($opt =~ /^--no-preparation$/) {
         $self->{'options'}{'preparation'} = 0;
         $self->{'options'}{'preparation'} = 0;
         return 1;
         return 1;
+    } elsif ($opt =~ /^--skip-patches$/) {
+        $self->{'options'}{'skip_patches'} = 1;
+        return 1;
     }
     }
     return 0;
     return 0;
 }
 }
@@ -140,7 +146,7 @@ sub do_extract {
                   @exclude_symlinks ]);
                   @exclude_symlinks ]);
 
 
     # Apply patches (in a separate method as it might be overriden)
     # Apply patches (in a separate method as it might be overriden)
-    $self->apply_patches($newdirectory);
+    $self->apply_patches($newdirectory) unless $self->{'options'}{'skip_patches'};
 }
 }
 
 
 sub get_autopatch_name {
 sub get_autopatch_name {