summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Source
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-10-02 19:51:59 +0200
committerGuillem Jover <guillem@debian.org>2016-10-30 04:54:03 +0100
commitea506ec3f20f6c81ce3dcff5cd99ab8146685a35 (patch)
tree57bb968a7829b8f3e6b1f89daf7f2cce5c85ac8a /scripts/Dpkg/Source
parentfa532fbc4bcf5d67a3e50174cb5518381a71d0b4 (diff)
downloaddpkg-ea506ec3f20f6c81ce3dcff5cd99ab8146685a35.tar.gz
Dpkg::Source::Package: Prefix private functions with _
Diffstat (limited to 'scripts/Dpkg/Source')
-rw-r--r--scripts/Dpkg/Source/Package/V2.pm24
-rw-r--r--scripts/Dpkg/Source/Package/V3/Bzr.pm6
-rw-r--r--scripts/Dpkg/Source/Package/V3/Git.pm6
-rw-r--r--scripts/Dpkg/Source/Package/V3/Quilt.pm16
4 files changed, 26 insertions, 26 deletions
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 610a74171..9f5b521ea 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -259,7 +259,7 @@ sub get_autopatch_name {
return 'zz_debian-diff-auto';
}
-sub get_patches {
+sub _get_patches {
my ($self, $dir, %opts) = @_;
$opts{skip_auto} //= 0;
my @patches;
@@ -281,14 +281,14 @@ sub get_patches {
sub apply_patches {
my ($self, $dir, %opts) = @_;
$opts{skip_auto} //= 0;
- my @patches = $self->get_patches($dir, %opts);
+ my @patches = $self->_get_patches($dir, %opts);
return unless scalar(@patches);
my $applied = File::Spec->catfile($dir, 'debian', 'patches', '.dpkg-source-applied');
open(my $applied_fh, '>', $applied)
or syserr(g_('cannot write %s'), $applied);
print { $applied_fh } "# During $opts{usage}\n";
my $timestamp = fs_time($applied);
- foreach my $patch ($self->get_patches($dir, %opts)) {
+ foreach my $patch ($self->_get_patches($dir, %opts)) {
my $path = File::Spec->catfile($dir, 'debian', 'patches', $patch);
info(g_('applying %s'), $patch) unless $opts{skip_auto};
my $patch_obj = Dpkg::Source::Patch->new(filename => $path);
@@ -302,7 +302,7 @@ sub apply_patches {
sub unapply_patches {
my ($self, $dir, %opts) = @_;
- my @patches = reverse($self->get_patches($dir, %opts));
+ my @patches = reverse($self->_get_patches($dir, %opts));
return unless scalar(@patches);
my $applied = File::Spec->catfile($dir, 'debian', 'patches', '.dpkg-source-applied');
my $timestamp = fs_time($applied);
@@ -317,7 +317,7 @@ sub unapply_patches {
unlink($applied);
}
-sub upstream_tarball_template {
+sub _upstream_tarball_template {
my $self = shift;
my $ext = '{' . join(',',
sort map {
@@ -332,7 +332,7 @@ sub can_build {
return 1 if $self->{options}{create_empty_orig} and
$self->find_original_tarballs(include_main => 0);
return (0, sprintf(g_('no upstream tarball found at %s'),
- $self->upstream_tarball_template()));
+ $self->_upstream_tarball_template()));
}
sub before_build {
@@ -390,7 +390,7 @@ sub check_patches_applied {
}
}
-sub generate_patch {
+sub _generate_patch {
my ($self, $dir, %opts) = @_;
my ($dirname, $updir) = fileparse($dir);
my $basedirname = $self->get_basename();
@@ -419,7 +419,7 @@ sub generate_patch {
}
error(g_('no upstream tarball found at %s'),
- $self->upstream_tarball_template()) unless $tarfile;
+ $self->_upstream_tarball_template()) unless $tarfile;
if ($opts{usage} eq 'build') {
info(g_('building %s using existing %s'),
@@ -463,7 +463,7 @@ sub generate_patch {
my $analysis = $header_from->analyze($dir, verbose => 0);
$diff->set_header($analysis->{patchheader});
} else {
- $diff->set_header($self->get_patch_header($dir));
+ $diff->set_header($self->_get_patch_header($dir));
}
$diff->add_diff_directory($tmp, $dir, basedirname => $basedirname,
%{$self->{diff_options}},
@@ -567,7 +567,7 @@ sub do_build {
# Create a patch
my $autopatch = File::Spec->catfile($dir, 'debian', 'patches',
$self->get_autopatch_name());
- my $tmpdiff = $self->generate_patch($dir, order_from => $autopatch,
+ my $tmpdiff = $self->_generate_patch($dir, order_from => $autopatch,
header_from => $autopatch,
handle_binary => $handle_binary,
skip_auto => $self->{options}{auto_commit},
@@ -608,7 +608,7 @@ sub do_build {
$self->add_file($debianfile);
}
-sub get_patch_header {
+sub _get_patch_header {
my ($self, $dir) = @_;
my $ph = File::Spec->catfile($dir, 'debian', 'source', 'local-patch-header');
unless (-f $ph) {
@@ -708,7 +708,7 @@ sub do_commit {
};
unless ($tmpdiff) {
- $tmpdiff = $self->generate_patch($dir, handle_binary => $handle_binary,
+ $tmpdiff = $self->_generate_patch($dir, handle_binary => $handle_binary,
usage => 'commit');
$binaryfiles->update_debian_source_include_binaries();
}
diff --git a/scripts/Dpkg/Source/Package/V3/Bzr.pm b/scripts/Dpkg/Source/Package/V3/Bzr.pm
index 058c96b06..7264e1e4a 100644
--- a/scripts/Dpkg/Source/Package/V3/Bzr.pm
+++ b/scripts/Dpkg/Source/Package/V3/Bzr.pm
@@ -52,7 +52,7 @@ sub import {
'bzr is not in the PATH'));
}
-sub sanity_check {
+sub _sanity_check {
my $srcdir = shift;
if (! -d "$srcdir/.bzr") {
@@ -106,7 +106,7 @@ sub do_build {
my $basedirname = $basename;
$basedirname =~ s/_/-/;
- sanity_check($dir);
+ _sanity_check($dir);
my $old_cwd = getcwd();
chdir $dir or syserr(g_("unable to chdir to '%s'"), $dir);
@@ -199,7 +199,7 @@ sub do_extract {
my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile");
$tar->extract($newdirectory);
- sanity_check($newdirectory);
+ _sanity_check($newdirectory);
my $old_cwd = getcwd();
chdir($newdirectory)
diff --git a/scripts/Dpkg/Source/Package/V3/Git.pm b/scripts/Dpkg/Source/Package/V3/Git.pm
index c9a056bd1..3113ca457 100644
--- a/scripts/Dpkg/Source/Package/V3/Git.pm
+++ b/scripts/Dpkg/Source/Package/V3/Git.pm
@@ -55,7 +55,7 @@ sub import {
'git is not in the PATH'));
}
-sub sanity_check {
+sub _sanity_check {
my $srcdir = shift;
if (! -d "$srcdir/.git") {
@@ -119,7 +119,7 @@ sub do_build {
my ($dirname, $updir) = fileparse($dir);
my $basenamerev = $self->get_basename(1);
- sanity_check($dir);
+ _sanity_check($dir);
my $old_cwd = getcwd();
chdir $dir or syserr(g_("unable to chdir to '%s'"), $dir);
@@ -254,7 +254,7 @@ sub do_extract {
subprocerr('cp') if $?;
}
- sanity_check($newdirectory);
+ _sanity_check($newdirectory);
}
1;
diff --git a/scripts/Dpkg/Source/Package/V3/Quilt.pm b/scripts/Dpkg/Source/Package/V3/Quilt.pm
index d3291fe69..fdb763531 100644
--- a/scripts/Dpkg/Source/Package/V3/Quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/Quilt.pm
@@ -80,7 +80,7 @@ sub parse_cmdline_option {
return 0;
}
-sub build_quilt_object {
+sub _build_quilt_object {
my ($self, $dir) = @_;
return $self->{quilt}{$dir} if exists $self->{quilt}{$dir};
$self->{quilt}{$dir} = Dpkg::Source::Quilt->new($dir);
@@ -96,7 +96,7 @@ sub can_build {
return (0, g_('non-native package version does not contain a revision'))
if $v->is_native();
- my $quilt = $self->build_quilt_object($dir);
+ my $quilt = $self->_build_quilt_object($dir);
$msg = $quilt->find_problems();
return (0, $msg) if $msg;
return 1;
@@ -121,7 +121,7 @@ sub apply_patches {
$opts{verbose} = 0;
}
- my $quilt = $self->build_quilt_object($dir);
+ my $quilt = $self->_build_quilt_object($dir);
$quilt->load_series(%opts) if $opts{warn_options}; # Trigger warnings
# Always create the quilt db so that if the maintainer calls quilt to
@@ -166,7 +166,7 @@ sub apply_patches {
sub unapply_patches {
my ($self, $dir, %opts) = @_;
- my $quilt = $self->build_quilt_object($dir);
+ my $quilt = $self->_build_quilt_object($dir);
$opts{verbose} //= 1;
@@ -199,7 +199,7 @@ sub prepare_build {
sub do_build {
my ($self, $dir) = @_;
- my $quilt = $self->build_quilt_object($dir);
+ my $quilt = $self->_build_quilt_object($dir);
my $version = $quilt->get_db_version();
if (defined($version) and $version != 2) {
@@ -217,7 +217,7 @@ sub do_build {
sub after_build {
my ($self, $dir) = @_;
- my $quilt = $self->build_quilt_object($dir);
+ my $quilt = $self->_build_quilt_object($dir);
my $pc_unapply = $quilt->get_db_file('.dpkg-source-unapply');
my $opt_unapply = $self->{options}{unapply_patches};
if (($opt_unapply eq 'auto' and -e $pc_unapply) or $opt_unapply eq 'yes') {
@@ -229,7 +229,7 @@ sub after_build {
sub check_patches_applied {
my ($self, $dir) = @_;
- my $quilt = $self->build_quilt_object($dir);
+ my $quilt = $self->_build_quilt_object($dir);
my $next = $quilt->next();
return if not defined $next;
@@ -243,7 +243,7 @@ sub check_patches_applied {
sub register_patch {
my ($self, $dir, $tmpdiff, $patch_name) = @_;
- my $quilt = $self->build_quilt_object($dir);
+ my $quilt = $self->_build_quilt_object($dir);
my $patch = $quilt->get_patch_file($patch_name);
if (-s $tmpdiff) {