From 88bf860ca31cae8c5d63b0d7a2ac8cd90ba85377 Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Tue, 1 Apr 2008 18:20:41 +0200 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ debian/changelog | 3 +++ man/dpkg-source.1 | 3 +++ scripts/Dpkg/Source/Package/V2_0.pm | 8 +++++++- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5d6b6d19..72a8c509 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-01 Raphael Hertzog + + * 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 * scripts/Dpkg/Source/Package/V2_0.pm (do_extract): Create diff --git a/debian/changelog b/debian/changelog index 5fda86a5..06a9a4a8 100644 --- a/debian/changelog +++ b/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). diff --git a/man/dpkg-source.1 b/man/dpkg-source.1 index fa29a0e3..68ce9b38 100644 --- a/man/dpkg-source.1 +++ b/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 diff --git a/scripts/Dpkg/Source/Package/V2_0.pm b/scripts/Dpkg/Source/Package/V2_0.pm index d3b34bcf..baf78e0b 100644 --- a/scripts/Dpkg/Source/Package/V2_0.pm +++ b/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 { -- 2.39.5