[SCM] Debian Qt/KDE packaging tools branch, master, updated. debian/0.6.5-6-g4e4605e

Modestas Vainius modax at alioth.debian.org
Sun Feb 21 11:02:47 UTC 2010


The following commit has been merged in the master branch:
commit 5d2ed7904134a44bc0f30ef04a3568de5815931b
Author: Modestas Vainius <modestas at vainius.eu>
Date:   Fri Feb 19 20:53:05 2010 +0200

    pkgkde-symbolshelper: compatibility fix for dpkg-dev 1.15.6 (Dpkg::IPC::spawn).
    
    Compatibility with 1.15.5 is retained as well. Also call new Dpkg::IPC::spawn()
    rather than Dpkg::IPC::fork_and_exec().
---
 debian/changelog                                   |    4 ++++
 .../Debian/PkgKde/SymbolsHelper/Patching.pm        |    3 +--
 symbolshelper/Dpkg/Shlibs/Cppfilt.pm               |    7 +++----
 symbolshelper/pkgkde-gensymbols                    |   10 ++++++++++
 symbolshelper/pkgkde-symbolshelper                 |   16 +++++++++++++---
 5 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 08e43f9..0d82fef 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
 pkg-kde-tools (0.6.6~pre1) UNRELEASED; urgency=low
 
+  * pkgkde-{symbolshelper,gensymbols}: compatibility fix for dpkg-dev 1.15.6
+    retaining compatibility with 1.15.5 as well (Dpkg::IPC::spawn).
+  * Use new Dpkg::IPC::spawn() rather than Dpkg::IPC::fork_and_exec() in the
+    code.
 
  -- Modestas Vainius <modax at debian.org>  Fri, 19 Feb 2010 20:30:09 +0200
 
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm
index 1e158b9..3c52db3 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm
@@ -230,8 +230,7 @@ sub apply {
 
     my $outfile = File::Temp->new(TEMPLATE => "${filename}_patch.out.XXXXXX");
     my $to_patch_process;
-    my $pid = fork_and_exec(exec => [ "patch", "--posix", "--force",
-                                      "-r-", "-p0" ],
+    my $pid = spawn(exec => [ "patch", "--posix", "--force", "-r-", "-p0" ],
                             from_pipe => \$to_patch_process,
                             to_handle => $outfile,
                             error_to_handle => $outfile,
diff --git a/symbolshelper/Dpkg/Shlibs/Cppfilt.pm b/symbolshelper/Dpkg/Shlibs/Cppfilt.pm
index 2dfcb4f..9898aa1 100644
--- a/symbolshelper/Dpkg/Shlibs/Cppfilt.pm
+++ b/symbolshelper/Dpkg/Shlibs/Cppfilt.pm
@@ -41,10 +41,9 @@ sub get_cppfilt {
     } else {
 	$filt = { from => undef, to => undef,
 	            last_symbol => "", last_result => "" };
-	$filt->{pid} = fork_and_exec(exec => [ 'c++filt',
-	                                       "--format=$type" ],
-	                             from_pipe => \$filt->{from},
-	                             to_pipe => \$filt->{to});
+	$filt->{pid} = spawn(exec => [ 'c++filt', "--format=$type" ],
+	                     from_pipe => \$filt->{from},
+	                     to_pipe => \$filt->{to});
 	internerr(_g("unable to execute c++filt")) unless defined $filt->{from};
 	$filt->{from}->autoflush(1);
 
diff --git a/symbolshelper/pkgkde-gensymbols b/symbolshelper/pkgkde-gensymbols
index a48461b..53799df 100755
--- a/symbolshelper/pkgkde-gensymbols
+++ b/symbolshelper/pkgkde-gensymbols
@@ -77,6 +77,16 @@ if (check_dpkg_version(1, 15, 5)) {
 	    unshift @INC, DATADIR;
 	}
 
+	# Compatibility with dpkg 1.15.5
+	require Dpkg::IPC;
+	if (! Dpkg::IPC->can("spawn") && Dpkg::IPC->can("fork_and_exec")) {
+	    *Dpkg::IPC::spawn = *Dpkg::IPC::fork_and_exec;
+	    push @Dpkg::IPC::EXPORT, "spawn";
+	    # Fool perl not to emit a warning
+	    my $nowarning = \&Dpkg::IPC::spawn;
+	    $nowarning = \&Dpkg::IPC::fork_and_exec;
+	}
+
 	eval "use Dpkg::Shlibs::SymbolFile";
 	eval "use Debian::PkgKde::SymbolsHelper::Symbol";
 
diff --git a/symbolshelper/pkgkde-symbolshelper b/symbolshelper/pkgkde-symbolshelper
index eef08fe..3072a2e 100755
--- a/symbolshelper/pkgkde-symbolshelper
+++ b/symbolshelper/pkgkde-symbolshelper
@@ -30,6 +30,16 @@ BEGIN {
     }
 }
 
+# Compatibility with dpkg 1.15.5
+BEGIN {
+    require Dpkg::IPC;
+    if (! Dpkg::IPC->can("spawn") && Dpkg::IPC->can("fork_and_exec")) {
+	*Dpkg::IPC::spawn = *Dpkg::IPC::fork_and_exec;
+	push @Dpkg::IPC::EXPORT, "spawn";
+    }
+}
+use Dpkg::IPC;
+
 use File::Spec;
 use File::Basename qw();
 use File::Copy qw();
@@ -37,7 +47,7 @@ use Getopt::Long qw(:config noignore_case);
 use Dpkg::ErrorHandling;
 use Dpkg::Arch qw(get_host_arch get_valid_arches);
 use Dpkg::Version;
-use Dpkg::IPC;
+
 use Debian::PkgKde::SymbolsHelper::SymbolFile;
 use Debian::PkgKde::SymbolsHelper::SymbolFileCollection;
 use Debian::PkgKde::SymbolsHelper::Patching;
@@ -427,8 +437,8 @@ sub patch_symfile {
 	    with_deprecated => 1,
 	);
 	$tmpfile->close();
-	fork_and_exec(exec => ["diff", "-u", $symfile->{file}, $tmpfile->filename],
-	    to_handle => \*STDERR, wait_child => 1, nocheck => 1);
+	spawn(exec => ["diff", "-u", $symfile->{file}, $tmpfile->filename],
+	      to_handle => \*STDERR, wait_child => 1, nocheck => 1);
     }
 
     return $template;

-- 
Debian Qt/KDE packaging tools



More information about the pkg-kde-commits mailing list