summaryrefslogtreecommitdiffstats
path: root/scripts/Dpkg/Source
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg/Source')
-rw-r--r--scripts/Dpkg/Source/Package.pm33
-rw-r--r--scripts/Dpkg/Source/Package/V1.pm3
-rw-r--r--scripts/Dpkg/Source/Package/V2.pm3
-rw-r--r--scripts/Dpkg/Source/Package/V3/Bzr.pm4
4 files changed, 28 insertions, 15 deletions
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index 3427383..3d336a1 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -29,7 +29,7 @@ is the one that supports the extraction of the source package.
=cut
-package Dpkg::Source::Package 2.02;
+package Dpkg::Source::Package 2.03;
use strict;
use warnings;
@@ -389,6 +389,21 @@ sub get_basename {
return $f->{'Source'} . '_' . $vs;
}
+=item $p->get_basedirname()
+
+Returns the default base directory name for the package.
+
+=cut
+
+sub get_basedirname {
+ my $self = shift;
+
+ my $dirname = $self->get_basename();
+ $dirname =~ s/_/-/;
+
+ return $dirname;
+}
+
sub find_original_tarballs {
my ($self, %opts) = @_;
$opts{extension} //= compression_get_file_extension_regex();
@@ -699,17 +714,21 @@ sub write_dsc {
=head1 CHANGES
+=head2 Version 2.03 (dpkg 1.22.7)
+
+New method: $p->get_basedirname().
+
=head2 Version 2.02 (dpkg 1.21.10)
-New method: armor_original_tarball_signature().
+New method: $p->armor_original_tarball_signature().
=head2 Version 2.01 (dpkg 1.20.1)
-New method: get_upstream_signing_key().
+New method: $p->get_upstream_signing_key().
=head2 Version 2.00 (dpkg 1.20.0)
-New method: check_original_tarball_signature().
+New method: $p->check_original_tarball_signature().
Remove variable: $diff_ignore_default_regexp.
@@ -721,12 +740,12 @@ New option: format in new().
=head2 Version 1.02 (dpkg 1.18.7)
-New option: require_strong_checksums in check_checksums().
+New option: require_strong_checksums in $p->check_checksums().
=head2 Version 1.01 (dpkg 1.17.2)
-New functions: get_default_diff_ignore_regex(), set_default_diff_ignore_regex(),
-get_default_tar_ignore_pattern()
+New functions: $p->get_default_diff_ignore_regex(),
+$p->set_default_diff_ignore_regex(), $p->get_default_tar_ignore_pattern().
Deprecated variables: $diff_ignore_default_regexp, @tar_ignore_default_pattern
diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm
index bdf2c87..566fd24 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -291,8 +291,7 @@ sub do_build {
my $sourcepackage = $self->{fields}{'Source'};
my $basenamerev = $self->get_basename(1);
my $basename = $self->get_basename();
- my $basedirname = $basename;
- $basedirname =~ s/_/-/;
+ my $basedirname = $self->get_basedirname();
# Try to find a .orig tarball for the package
my $origdir = "$dir.orig";
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 1f09461..a3d6c49 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -406,8 +406,7 @@ sub check_patches_applied {
sub _generate_patch {
my ($self, $dir, %opts) = @_;
my ($dirname, $updir) = fileparse($dir);
- my $basedirname = $self->get_basename();
- $basedirname =~ s/_/-/;
+ my $basedirname = $self->get_basedirname();
# Identify original tarballs
my ($tarfile, %addonfile);
diff --git a/scripts/Dpkg/Source/Package/V3/Bzr.pm b/scripts/Dpkg/Source/Package/V3/Bzr.pm
index adc5fda..953f7d9 100644
--- a/scripts/Dpkg/Source/Package/V3/Bzr.pm
+++ b/scripts/Dpkg/Source/Package/V3/Bzr.pm
@@ -109,9 +109,6 @@ sub do_build {
my $sourcepackage = $self->{fields}{'Source'};
my $basenamerev = $self->get_basename(1);
- my $basename = $self->get_basename();
- my $basedirname = $basename;
- $basedirname =~ s/_/-/;
_check_workdir($dir);
@@ -179,7 +176,6 @@ sub do_extract {
my ($self, $newdirectory) = @_;
my $fields = $self->{fields};
- my $basename = $self->get_basename();
my $basenamerev = $self->get_basename(1);
my @files = $self->get_files();