From 25e7bfc26fbacbfeb3875e75df02fa9409571d4e Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Sat, 23 Dec 2017 17:49:02 -0500 Subject: [PATCH] persistence: Fix regression in saving options. The move to JSON storage of persistent opts break first-time users, since the refactored code never actually gets around to setting a persistent_options key in the build context object. This seemed to work previously with Data::Dumper, but JSON::PP is not happy with being asked to serialize an undef. On the other hand I had always thought that sub setPersistentOption would have 'autovivified' the needed hash table, and the reporter's build process should have resulted in many calls to setPersistentOption over the build. BUG:388180 FIXED-IN:18.01 --- modules/ksb/BuildContext.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ksb/BuildContext.pm b/modules/ksb/BuildContext.pm index 2e063fd..43b23b0 100644 --- a/modules/ksb/BuildContext.pm +++ b/modules/ksb/BuildContext.pm @@ -153,6 +153,7 @@ sub new rcFiles => [@rcfiles], rcFile => undef, env => { }, + persistent_options => { } # These are kept across multiple script runs ignore_list => [ ], # List of KDE project paths to ignore completely kde_projects_metadata => undef, # Enumeration of kde-projects kde_dependencies_metadata => undef, # Dependency resolution of kde-projects @@ -827,7 +828,6 @@ sub storePersistentOptions } my $encodedJSON = $json->encode($self->{persistent_options}); - print $fh $encodedJSON; undef $fh; # Closes the file }