Anonymous avatar Anonymous committed 293d605

Various fixes for recent configurations.

Comments (0)

Files changed (1)

first-rev/SmokeAuto.pm

 
     if (system(@args))
     {
-        die "Cannot exec " . $args[0];
+        die "Cannot exec " . join(" ", map { qq{"$_"} } @args);
     }
+
+    return;
 }
 
 sub run_in_env
 
 sub install_cpanplus
 {
-    run_in_env(sub {
-    foreach my $module (qw(IPC::Cmd CPANPLUS))
-    {
-        exec_program($perl_exe, "-MCPAN", "-e", "install('$module')");
-    }
-    });
+    run_in_env(
+        sub {
+            # CPANPLUS does not handle downloads without LWP properly
+            # so we need to install LWP::UserAgent at this stage.
+            foreach my $module (qw(LWP::UserAgent IPC::Cmd CPANPLUS))
+            {
+                exec_program($perl_exe, "-MCPAN", "-e", "install('$module')");
+            }
+        }
+    );
 }
 
 sub install_module
 {
     my $module = shift;
-    my @args = ($perl_exe, "-MCPANPLUS", "-e", 'install("' . $module . '")');
+    my @args =
+    (
+        $perl_exe, "-MCPANPLUS", "-e",
+        'exit(!install("' . $module . '"))'
+    );
     # print join(",",@args), "\n";
     local $ENV{PERL_MM_USE_DEFAULT} = 1;
-    if (! (exec_program(@args) == 0))
-    {
-        die "Failed at installing module '$module'!";
-    }
+    exec_program(@args);
 }
 
 sub install_first_smokers
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.