[Rt-commit] r4093 - in rt/branches/3.5-TESTING: . sbin
alexmv at bestpractical.com
alexmv at bestpractical.com
Mon Nov 14 17:58:14 EST 2005
Author: alexmv
Date: Mon Nov 14 17:58:13 2005
New Revision: 4093
Modified:
rt/branches/3.5-TESTING/ (props changed)
rt/branches/3.5-TESTING/sbin/rt-test-dependencies.in
Log:
r7177 at zoq-fot-pik: chmrr | 2005-11-14 17:46:20 -0500
RT-Ticket: 7063
RT-Status: resolved
RT-Update: correspond
* Ability to shell out to outside program to install deps; variant of
patch from Ruz.
Modified: rt/branches/3.5-TESTING/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/3.5-TESTING/sbin/rt-test-dependencies.in (original)
+++ rt/branches/3.5-TESTING/sbin/rt-test-dependencies.in Mon Nov 14 17:58:13 2005
@@ -139,6 +139,12 @@
You can also specify -v or --verbose to list the status of all dependencies,
rather than just the missing ones.
+
+The "RT_FIX_DEPS_CMD" environment variable, if set, will be used
+instead of the standard CPAN shell by --install to install any
+required modules. It will be called with the module name, or, if
+"RT_FIX_DEPS_CMD" contains a "%s", will replace the "%s" with the
+module name ebcore calling the program.
.
}
@@ -312,7 +318,20 @@
sub resolve_dep {
my $module = shift;
- system( qq[@PERL@ -MCPAN -e'install("$module")'] );
+ print "\tInstall module $module\n";
+ my $ext = $ENV{'RT_FIX_DEPS_CMD'};
+ unless( $ext ) {
+ require CPAN;
+ return CPAN::Shell->install($module);
+ }
+
+ if( $ext =~ /\%s/) {
+ $ext =~ s/\%s/$module/g; # sprintf( $ext, $module );
+ } else {
+ $ext .= " $module";
+ }
+ print "\t\tcommand: '$ext'\n";
+ return scalar `$ext 1>&2`;
}
sub download_mods {
More information about the Rt-commit
mailing list