Hi!

On Sat, 2013-09-28 at 08:13:29 +0100, Adam D. Barratt wrote:
> Control: tags -1 + pending
> 
> On Sat, 2013-09-28 at 05:47 +0200, Guillem Jover wrote:
> > On Thu, 2013-09-26 at 05:37:30 +0100, Adam D. Barratt wrote:
> > > On Thu, 2013-09-26 at 04:46 +0200, Guillem Jover wrote:
> > > > On Tue, 2013-09-24 at 19:47:16 +0100, Adam D. Barratt wrote:
> > > > > This looks okay overall; thanks. I'm assuming that the changes have 
> > > > > been
> > > > > tested on a stable system, particularly the Replaces.
> > > > 
> > > > Yes. Let me know if and when you want this uploaded to the stable
> > > > queue.
> > > 
> > > Please feel free to go ahead.
> > 
> > Done, thanks!
> 
> Flagged for acceptance.

Thanks, unfortunately 724949 just came in a day after the upload, it
involves improper caching of the «dpkg --print-architecture» and
«gcc -dumpmachine» output, affecting the performance of wanna-build.
This was already fixed in 1.17.0, so it has been tested for a while.

I was wondering if you'd be fine with a quick 1.16.12 upload, with the
attached diff?

(Just for future reference, would you have preferred a separate bug
report?)

Thanks,
Guillem
diff --git a/debian/changelog b/debian/changelog
index a8c0c87..1f4d107 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dpkg (1.16.12) stable; urgency=low
+
+  * Fix value caching in Dpkg::Arch by not shadowing the variables.
+    Closes: #724949
+
+ -- Guillem Jover <guil...@debian.org>  Mon, 30 Sep 2013 16:52:37 +0200
+
 dpkg (1.16.11) stable; urgency=low
 
   [ Raphaël Hertzog ]
diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
index bfc19f4..bfee423 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
@@ -59,7 +59,7 @@ my %debarch_to_debtriplet;
 	# dpkg-architecture itself, by avoiding computing the DEB_BUILD_
 	# variables when they are not requested.
 
-	my $build_arch = `dpkg --print-architecture`;
+	$build_arch = `dpkg --print-architecture`;
 	syserr("dpkg --print-architecture failed") if $? >> 8;
 
 	chomp $build_arch;
@@ -75,7 +75,7 @@ my %debarch_to_debtriplet;
     {
 	return $gcc_host_gnu_type if defined $gcc_host_gnu_type;
 
-	my $gcc_host_gnu_type = `\${CC:-gcc} -dumpmachine`;
+	$gcc_host_gnu_type = `\${CC:-gcc} -dumpmachine`;
 	if ($? >> 8) {
 	    $gcc_host_gnu_type = '';
 	} else {
commit dbe1c7762def447088c3d3a29eea0d7012af525f
Author: Guillem Jover <guil...@debian.org>
Date:   Mon Sep 30 16:52:53 2013 +0200

    Release 1.16.12

commit 8dafb822bb93de1ababd850360844986c9e0e900
Author: Guillem Jover <guil...@debian.org>
Date:   Tue Jan 1 19:30:36 2013 +0100

    Dpkg::Arch: Fix value caching by not shadowing the variables
    
    Cherry picked from commit a64bfa733075a7140193f5a4b9d4292234dd230e.
    
    The effect of not caching the values has a severe impact on
    performance on code repeatedly calling (directly or indirectly)
    the get_raw_build_arch() and get_raw_host_arch() functions.
    
    Addresses Variables::ProhibitReusedNames.
    
    Closes: #724949

Reply via email to