瀏覽代碼

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 年之前
父節點
當前提交
88bf860ca3
共有 4 個文件被更改,包括 20 次插入1 次删除
  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>
 
 	* 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
     Format: 1.0 to Format: 3.0 (quilt) without manual intervention of the
     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 ]
   * German. (Sven Joachim).

+ 3 - 0
man/dpkg-source.1

@@ -413,6 +413,9 @@ apparently unapplied.
 .PP
 .B Extract options
 .TP
+.B \-\-skip\-patches
+Do not apply patches at the end of the extraction.
+.TP
 .B \-\-without\-quilt
 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

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

@@ -49,6 +49,9 @@ sub init_options {
         unless exists $self->{'options'}{'include_binaries'};
     $self->{'options'}{'preparation'} = 1
         unless exists $self->{'options'}{'preparation'};
+    $self->{'options'}{'skip_patches'} = 0
+        unless exists $self->{'options'}{'skip_patches'};
+
 }
 
 sub parse_cmdline_option {
@@ -65,6 +68,9 @@ sub parse_cmdline_option {
     } elsif ($opt =~ /^--no-preparation$/) {
         $self->{'options'}{'preparation'} = 0;
         return 1;
+    } elsif ($opt =~ /^--skip-patches$/) {
+        $self->{'options'}{'skip_patches'} = 1;
+        return 1;
     }
     return 0;
 }
@@ -140,7 +146,7 @@ sub do_extract {
                   @exclude_symlinks ]);
 
     # 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 {