summaryrefslogtreecommitdiff
path: root/scripts/Dpkg
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r--scripts/Dpkg/Arch.pm38
-rw-r--r--scripts/Dpkg/Compression/FileHandle.pm16
-rw-r--r--scripts/Dpkg/Exit.pm8
-rw-r--r--scripts/Dpkg/Version.pm6
4 files changed, 34 insertions, 34 deletions
diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
index 969d2e88e..972b21718 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
@@ -204,8 +204,8 @@ Get an array with all currently known Debian architectures.
sub get_valid_arches()
{
- read_cputable();
- read_ostable();
+ _load_cputable();
+ _load_ostable();
my @arches;
@@ -220,7 +220,7 @@ sub get_valid_arches()
}
my %table_loaded;
-sub load_table
+sub _load_table
{
my ($table, $loader) = @_;
@@ -239,9 +239,9 @@ sub load_table
$table_loaded{$table} = 1;
}
-sub read_cputable
+sub _load_cputable
{
- load_table('cputable', sub {
+ _load_table('cputable', sub {
if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/) {
$cputable{$1} = $2;
$cputable_re{$1} = $3;
@@ -252,9 +252,9 @@ sub read_cputable
});
}
-sub read_ostable
+sub _load_ostable
{
- load_table('ostable', sub {
+ _load_table('ostable', sub {
if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
$ostable{$1} = $2;
$ostable_re{$1} = $3;
@@ -263,20 +263,20 @@ sub read_ostable
});
}
-sub abitable_load()
+sub _load_abitable()
{
- load_table('abitable', sub {
+ _load_table('abitable', sub {
if (m/^(?!\#)(\S+)\s+(\S+)/) {
$abibits{$1} = $2;
}
});
}
-sub read_triplettable()
+sub _load_triplettable()
{
- read_cputable();
+ _load_cputable();
- load_table('triplettable', sub {
+ _load_table('triplettable', sub {
if (m/^(?!\#)(\S+)\s+(\S+)/) {
my $debtriplet = $1;
my $debarch = $2;
@@ -304,8 +304,8 @@ sub debtriplet_to_gnutriplet(@)
{
my ($abi, $os, $cpu) = @_;
- read_cputable();
- read_ostable();
+ _load_cputable();
+ _load_ostable();
return unless defined($abi) && defined($os) && defined($cpu) &&
exists($cputable{$cpu}) && exists($ostable{"$abi-$os"});
@@ -319,8 +319,8 @@ sub gnutriplet_to_debtriplet($)
my ($gnu_cpu, $gnu_os) = split(/-/, $gnu, 2);
return unless defined($gnu_cpu) && defined($gnu_os);
- read_cputable();
- read_ostable();
+ _load_cputable();
+ _load_ostable();
my ($os, $cpu);
@@ -377,7 +377,7 @@ sub debtriplet_to_debarch(@)
{
my ($abi, $os, $cpu) = @_;
- read_triplettable();
+ _load_triplettable();
if (!defined($abi) || !defined($os) || !defined($cpu)) {
return;
@@ -394,7 +394,7 @@ sub debarch_to_debtriplet($)
return if not defined $arch;
- read_triplettable();
+ _load_triplettable();
if ($arch =~ /^linux-([^-]*)/) {
# XXX: Might disappear in the future, not sure yet.
@@ -460,7 +460,7 @@ sub debarch_to_cpuattrs($)
my ($abi, $os, $cpu) = debarch_to_debtriplet($arch);
if (defined($cpu)) {
- abitable_load();
+ _load_abitable();
return ($abibits{$abi} // $cpubits{$cpu}, $cpuendian{$cpu});
} else {
diff --git a/scripts/Dpkg/Compression/FileHandle.pm b/scripts/Dpkg/Compression/FileHandle.pm
index 9d91b7756..9ce717c10 100644
--- a/scripts/Dpkg/Compression/FileHandle.pm
+++ b/scripts/Dpkg/Compression/FileHandle.pm
@@ -171,9 +171,9 @@ sub ensure_open {
delete $opts{to_file};
if ($mode eq 'w') {
- $self->open_for_write(%opts);
+ $self->_open_for_write(%opts);
} elsif ($mode eq 'r') {
- $self->open_for_read(%opts);
+ $self->_open_for_read(%opts);
} else {
croak "invalid mode in ensure_open: $mode";
}
@@ -213,9 +213,9 @@ sub OPEN {
my ($mode, $filename) = @_;
$self->set_filename($filename);
if ($mode eq '>') {
- $self->open_for_write();
+ $self->_open_for_write();
} elsif ($mode eq '<') {
- $self->open_for_read();
+ $self->_open_for_read();
} else {
croak 'Dpkg::Compression::FileHandle does not support ' .
"open() mode $mode";
@@ -235,7 +235,7 @@ sub CLOSE {
} else {
$ret = 0;
}
- $self->cleanup();
+ $self->_cleanup();
return $ret;
}
@@ -390,7 +390,7 @@ sub get_filehandle {
## INTERNAL METHODS
-sub open_for_write {
+sub _open_for_write {
my ($self, %opts) = @_;
my $filehandle;
@@ -408,7 +408,7 @@ sub open_for_write {
*$self->{file} = $filehandle;
}
-sub open_for_read {
+sub _open_for_read {
my ($self, %opts) = @_;
my $filehandle;
@@ -427,7 +427,7 @@ sub open_for_read {
*$self->{file} = $filehandle;
}
-sub cleanup {
+sub _cleanup {
my $self = shift;
my $cmdline = *$self->{compressor}{cmdline} // '';
*$self->{compressor}->wait_end_process(nocheck => *$self->{allow_sigpipe});
diff --git a/scripts/Dpkg/Exit.pm b/scripts/Dpkg/Exit.pm
index 1861de7f0..b98b949ed 100644
--- a/scripts/Dpkg/Exit.pm
+++ b/scripts/Dpkg/Exit.pm
@@ -78,14 +78,14 @@ sub run_exit_handlers {
&$_() foreach (reverse @handlers);
}
-sub exit_handler {
+sub _exit_handler {
run_exit_handlers();
exit(127);
}
-$SIG{INT} = \&exit_handler;
-$SIG{HUP} = \&exit_handler;
-$SIG{QUIT} = \&exit_handler;
+$SIG{INT} = \&_exit_handler;
+$SIG{HUP} = \&_exit_handler;
+$SIG{QUIT} = \&_exit_handler;
=back
diff --git a/scripts/Dpkg/Version.pm b/scripts/Dpkg/Version.pm
index ec91a3d80..f043e0f20 100644
--- a/scripts/Dpkg/Version.pm
+++ b/scripts/Dpkg/Version.pm
@@ -52,8 +52,8 @@ use constant {
};
use overload
- '<=>' => \&comparison,
- 'cmp' => \&comparison,
+ '<=>' => \&_comparison,
+ 'cmp' => \&_comparison,
'""' => sub { return $_[0]->as_string(); },
'bool' => sub { return $_[0]->as_string() if $_[0]->is_valid(); },
'fallback' => 1;
@@ -175,7 +175,7 @@ its string representation is a version number.
=cut
-sub comparison {
+sub _comparison {
my ($a, $b, $inverted) = @_;
if (not ref($b) or not $b->isa('Dpkg::Version')) {
$b = Dpkg::Version->new($b);