sekikn opened a new pull request #776:
URL: https://github.com/apache/bigtop/pull/776


   https://issues.apache.org/jira/browse/BIGTOP-3540
   
   Currently, `./gradlew toolchain` succeeds silently even if it fails to 
install R libraries.
   With this PR, users can get aware of that failure from the message as 
follows (manually edited renv.pp for testing purpose, to specify non-existent 
package):
   
   ```
   Debug: Exec[install_r_packages](provider=posix): Executing '/usr/bin/R -e 
'pkgs <- c("foo"); install.packages(pkgs, repo="http://cran.r-project.org/";); 
for (pkg in pkgs[pkgs != "devtools"]) if (!library(pkg, character.only=TRUE, 
logical.return=TRUE)) q(save="no", status=1)''
   Debug: Executing '/usr/bin/R -e 'pkgs <- c("foo"); install.packages(pkgs, 
repo="http://cran.r-project.org/";); for (pkg in pkgs[pkgs != "devtools"]) if 
(!library(pkg, character.only=TRUE, logical.return=TRUE)) q(save="no", 
status=1)''
   
   ...
   
   Error: /usr/bin/R -e 'pkgs <- c("foo"); install.packages(pkgs, 
repo="http://cran.r-project.org/";); for (pkg in pkgs[pkgs != "devtools"]) if 
(!library(pkg, character.only=TRUE, logical.return=TRUE)) q(save="no", 
status=1)' returned 1 instead of one of [0]
   Error: /Stage[main]/Bigtop_toolchain::Renv/Exec[install_r_packages]/returns: 
change from notrun to 0 failed: /usr/bin/R -e 'pkgs <- c("foo"); 
install.packages(pkgs, repo="http://cran.r-project.org/";); for (pkg in 
pkgs[pkgs != "devtools"]) if (!library(pkg, character.only=TRUE, 
logical.return=TRUE)) q(save="no", status=1)' returned 1 instead of one of [0]
   
   ...
   
   BUILD SUCCESSFUL in 19s
   1 actionable task: 1 executed
   ```
   
   In the above example, `puppet apply` itself still succeeded, but it's 
already filed as https://issues.apache.org/jira/browse/BIGTOP-3402 and will be 
addressed separately.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to