summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Source
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg/Source')
-rw-r--r--scripts/Dpkg/Source/Package.pm8
-rw-r--r--scripts/Dpkg/Source/Package/V2.pm5
2 files changed, 13 insertions, 0 deletions
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index 6c9cba2ca..c9d1a07e2 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -374,6 +374,10 @@ sub do_extract {
# Function used specifically during creation of a source package
+sub before_build {
+ my ($self, $dir) = @_;
+}
+
sub build {
my $self = shift;
eval { $self->do_build(@_) };
@@ -383,6 +387,10 @@ sub build {
}
}
+sub after_build {
+ my ($self, $dir) = @_;
+}
+
sub do_build {
internerr("Dpkg::Source::Package doesn't know how to build a " .
"source package. Use one of the subclasses.");
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 1fc1e0abe..787d6acd6 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -214,6 +214,11 @@ sub can_build {
return (0, _g("no orig.tar file found"));
}
+sub before_build {
+ my ($self, $dir) = @_;
+ $self->check_patches_applied($dir) if $self->{'options'}{'preparation'};
+}
+
sub prepare_build {
my ($self, $dir) = @_;
$self->{'diff_options'} = {