]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1163248: checksetup.pl is unable to run if File::Slurp is missing
authorFrédéric Buclin <LpSolit@gmail.com>
Thu, 14 May 2015 13:01:24 +0000 (15:01 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 14 May 2015 13:01:24 +0000 (15:01 +0200)
r=dkl a=glob

Bugzilla/Install/Requirements.pm
template/en/default/setup/strings.txt.pl

index 4dbb0caef22fe99c23b4e65d233979ddc1d3ab85..2db36f89dcc070273744c5d5825310fd789d6f50 100644 (file)
@@ -18,13 +18,14 @@ use strict;
 use warnings;
 
 use Bugzilla::Constants;
-use Bugzilla::Install::Util qw(install_string bin_loc
+use Bugzilla::Install::Util qw(install_string bin_loc success
                                extension_requirement_packages);
-use File::Slurp;
 use List::Util qw(max);
 use Term::ANSIColor;
 
 use parent qw(Exporter);
+use autodie;
+
 our @EXPORT = qw(
     REQUIRED_MODULES
     OPTIONAL_MODULES
@@ -907,7 +908,11 @@ sub export_cpanfile {
     }
 
     # Write out the cpanfile to the document root
-    write_file(bz_locations()->{'libpath'} . '/cpanfile', \$cpanfile);
+    my $file = bz_locations()->{'libpath'} . '/cpanfile';
+    open(my $fh, '>', $file);
+    print $fh $cpanfile;
+    close $fh;
+    success(install_string('cpanfile_created', { file => $file }));
 }
 
 1;
index 77bc85d1cd46c15352b7f3ed2b890d5f4bd0645e..d1d23020080e7754501d6235cfc07a9cbd48e637 100644 (file)
@@ -62,6 +62,7 @@ EOT
 Re-run checksetup.pl in interactive mode (without an 'answers' file)
 to continue.
 END
+    cpanfile_created => "##file## created",
     cpan_bugzilla_home => 
         "WARNING: Using the Bugzilla directory as the CPAN home.",
     db_enum_setup  => "Setting up choices for standard drop-down fields:",