[SCM] Debian Qt/KDE packaging tools branch, master, updated. debian/0.6.6
Modestas Vainius
modax at alioth.debian.org
Sun Feb 28 18:58:48 UTC 2010
The following commit has been merged in the master branch:
commit 442b1e2470c627c48d9abfef8e4deddcb2e5cadf
Author: Modestas Vainius <modestas at vainius.eu>
Date: Sun Feb 21 15:35:33 2010 +0200
Adapt symbolshelper code to API changes in dpkg.git master.
See previous commit.
---
.../Debian/PkgKde/SymbolsHelper/Patching.pm | 4 ++--
.../Debian/PkgKde/SymbolsHelper/SymbolFile.pm | 14 +++++++-------
symbolshelper/pkgkde-gensymbols | 13 +++++++------
symbolshelper/pkgkde-symbolshelper | 6 +++---
4 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm
index 3c52db3..ab617ef 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm
@@ -211,7 +211,7 @@ sub complete {
return $self->is_valid();
}
-sub dump {
+sub output {
my ($self, $outfh, $filename) = @_;
$filename = $self->{target} unless $filename;
@@ -236,7 +236,7 @@ sub apply {
error_to_handle => $outfile,
wait_child => 0
);
- my $ret = $self->dump($to_patch_process, $filename);
+ my $ret = $self->output($to_patch_process, $filename);
close $to_patch_process;
wait_child($pid, nocheck => 1);
$ret &&= !$?;
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFile.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFile.pm
index fa7d8d0..97037a9 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFile.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFile.pm
@@ -29,8 +29,8 @@ use Debian::PkgKde::SymbolsHelper::Symbol;
use Debian::PkgKde::SymbolsHelper::Substs;
# Use Debian::PkgKde::SymbolsHelper::Symbol as base symbol
-sub load {
- my ($self, $file, $seen, $obj_ref, $base_symbol) = @_;
+sub parse {
+ my ($self, $fh, $file, $seen, $obj_ref, $base_symbol) = @_;
unless (defined $base_symbol) {
$base_symbol = 'Debian::PkgKde::SymbolsHelper::Symbol';
}
@@ -46,7 +46,7 @@ sub load {
$self->set_confirmed(split(/\s+/, $1));
}
}
- return $self->SUPER::load($file, $seen, $obj_ref, $base_symbol);
+ return $self->SUPER::parse($fh, $file, $seen, $obj_ref, $base_symbol);
}
sub set_confirmed {
@@ -81,7 +81,7 @@ sub fork_symbol {
return $nsym;
}
-sub dump {
+sub output {
my ($self, $fh, %opts) = @_;
$opts{with_confirmed} = 1 unless exists $opts{with_confirmed};
# Write SymbolsHelper-Confirmed header
@@ -89,10 +89,10 @@ sub dump {
my @carches = $self->get_confirmed_arches();
if (@carches) {
print $fh '# SymbolsHelper-Confirmed: ', $self->get_confirmed_version(),
- " ", join(" ", sort @carches), "\n";
+ " ", join(" ", sort @carches), "\n" if defined $fh;
}
}
- return $self->SUPER::dump($fh, %opts);
+ return $self->SUPER::output($fh, %opts);
}
sub _resync_symbol_cache {
@@ -201,7 +201,7 @@ sub patch_template {
TEMPLATE => "${package}_orig.symbolsXXXXXX",
UNLINK => 0,
);
- $self->dump($tmpfile,
+ $self->output($tmpfile,
package => $package,
template_mode => 1,
with_confirmed => 0,
diff --git a/symbolshelper/pkgkde-gensymbols b/symbolshelper/pkgkde-gensymbols
index 53799df..f0da03a 100755
--- a/symbolshelper/pkgkde-gensymbols
+++ b/symbolshelper/pkgkde-gensymbols
@@ -38,15 +38,16 @@ sub find_dpkg_gensymbols {
return (undef, undef);
}
-my $old_symbolfile_load;
+my $old_symbolfile_parse;
-sub new_symbolfile_load {
+sub new_symbolfile_parse {
# Use Debian::PkgKde::SymbolsHelper::Symbol as base symbol
- my ($self, $file, $seen, $obj_ref, $base_symbol) = @_;
+ my ($self, $fh, $file, $seen, $obj_ref, $base_symbol) = @_;
unless (defined $base_symbol) {
$base_symbol = 'Debian::PkgKde::SymbolsHelper::Symbol';
}
- return &$old_symbolfile_load($self, $file, $seen, $obj_ref, $base_symbol);
+ return &$old_symbolfile_parse($self, $fh, $file, $seen, $obj_ref,
+ $base_symbol);
}
sub check_dpkg_version {
@@ -93,8 +94,8 @@ if (check_dpkg_version(1, 15, 5)) {
# Replace Dpkg::Shlibs::SymbolFile::load with a custom version
# which uses Debian::PkgKde::SymbolsHelper::Symbol rather than
# Dpkg::Shlibs::Symbol
- $old_symbolfile_load = *Dpkg::Shlibs::SymbolFile::load;
- *Dpkg::Shlibs::SymbolFile::load = *new_symbolfile_load;
+ $old_symbolfile_parse = *Dpkg::Shlibs::SymbolFile::parse;
+ *Dpkg::Shlibs::SymbolFile::parse = *new_symbolfile_parse;
do "$exe";
} else {
diff --git a/symbolshelper/pkgkde-symbolshelper b/symbolshelper/pkgkde-symbolshelper
index 409c385..5307ef5 100755
--- a/symbolshelper/pkgkde-symbolshelper
+++ b/symbolshelper/pkgkde-symbolshelper
@@ -165,7 +165,7 @@ sub find_package_symbolfile_path {
sub out_symfile {
my ($symfile, %opts) = @_;
- return 1 unless $symfile;
+ return 1 unless defined $symfile;
my $out_fh;
my $out_file = $opt_out;
@@ -185,7 +185,7 @@ sub out_symfile {
File::Copy::copy($out_file, $out_file.'~') if ($backup && -r $out_file);
$symfile->save($out_file, template_mode => 1, with_deprecated => 1, %opts);
} elsif ($out_fh) {
- $symfile->dump($out_fh, template_mode => 1, with_deprecated => 1, %opts);
+ $symfile->output($out_fh, template_mode => 1, with_deprecated => 1, %opts);
} else {
error("output file could not be determined");
}
@@ -431,7 +431,7 @@ sub patch_symfile {
# Generate diff
if ($opt_verbose) {
my $tmpfile = File::Temp->new(TEMPLATE => "${opt_in}.newXXXXXX");
- $template->dump($tmpfile,
+ $template->output($tmpfile,
package => $opt_package,
template_mode => 1,
with_deprecated => 1,
--
Debian Qt/KDE packaging tools
More information about the pkg-kde-commits
mailing list