From ab7e4149471d48fb00bcbbf59ceafdde87782c51 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 13 Apr 2015 18:17:10 +0100 Subject: Bug 1152360: backport upstream bug 1143005 that adds a parameter to checksetup.pl for generating cpanfile for dependency resolution --- checksetup.pl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'checksetup.pl') diff --git a/checksetup.pl b/checksetup.pl index 501138c6d..d3b4cc1d7 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -68,13 +68,19 @@ Bugzilla::Install::Util::no_checksetup_from_cgi() if $ENV{'SERVER_SOFTWARE'}; init_console(); my %switch; -GetOptions(\%switch, 'help|h|?', 'check-modules', 'no-templates|t', - 'verbose|v|no-silent', 'make-admin=s', - 'reset-password=s', 'version|V'); +GetOptions(\%switch, 'help|h|?', 'check-modules', 'cpanfile', + 'no-templates|t', 'verbose|v|no-silent', + 'make-admin=s', 'reset-password=s', 'version|V'); # Print the help message if that switch was selected. pod2usage({-verbose => 1, -exitval => 1}) if $switch{'help'}; +# Export cpanfile and exit +if ($switch{cpanfile}) { + export_cpanfile(); + exit; +} + # Read in the "answers" file if it exists, for running in # non-interactive mode. my $answers_file = $ARGV[0]; @@ -280,6 +286,12 @@ the L section. Display this help text +=item B<--cpanfile> + +Outputs a cpanfile in the document root listing the current and optional +modules with their respective versions. This file can be used by +and other utilities used to install Perl dependencies. + =item B<--check-modules> Only check for correct module dependencies and quit afterward. -- cgit v1.2.3-24-g4f1b