Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Sep 2013 09:17:14 +0000 (UTC)
From:      Dag-Erling Smørgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r255758 - user/des/tinderbox
Message-ID:  <201309210917.r8L9HEPB088232@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Sat Sep 21 09:17:14 2013
New Revision: 255758
URL: http://svnweb.freebsd.org/changeset/base/255758

Log:
  %INITIAL_CONFIG contains arrayrefs, so we need to deep-clone it into
  %CONFIG; otherwise, modifying e.g. %CONFIG{ENV} will actually modify
  %INITIAL_CONFIG{ENV} and thereby contaminate the next job.

Modified:
  user/des/tinderbox/tbmaster.pl

Modified: user/des/tinderbox/tbmaster.pl
==============================================================================
--- user/des/tinderbox/tbmaster.pl	Sat Sep 21 04:11:51 2013	(r255757)
+++ user/des/tinderbox/tbmaster.pl	Sat Sep 21 09:17:14 2013	(r255758)
@@ -32,6 +32,7 @@ use strict;
 use Fcntl qw(:DEFAULT :flock);
 use POSIX;
 use Getopt::Long;
+use Storable qw(dclone);
 
 my $VERSION	= "2.10";
 my $COPYRIGHT	= "Copyright (c) 2003-2012 Dag-Erling Smørgrav. " .
@@ -147,7 +148,7 @@ sub expand($) {
 #
 sub clearconf() {
 
-    %CONFIG = %INITIAL_CONFIG;
+    %CONFIG = %{dclone(\%INITIAL_CONFIG)};
 }
 
 #



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309210917.r8L9HEPB088232>