Bug 380719 - FIXED IN SVN: output of system commands is not shown
Summary: FIXED IN SVN: output of system commands is not shown
Status: RESOLVED FIXED
Alias: None
Product: rkward
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-22 18:14 UTC by RKWard Team
Modified: 2011-03-20 11:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RKWard Team 2010-08-22 18:14:43 UTC
-- Originally posted by (AT sourceforge.net): chengas123 --

-- This ticket was imported from http://sourceforge.net/p/rkward/bugs/72 on 2017-05-30 15:26:44 +0100 --
When I get an error installing a package in RKWard I cannot determine why:

install.packages\("quantstrat", repos="http://R-Forge.R-project.org", type="source"\)
Warning in install.packages\("quantstrat", repos = "http://R-Forge.R-project.org",  :
argument 'lib' is missing: using '/home/bmccann/R/i486-pc-linux-gnu-library/2.11'
Warning: dependency âblotter \(>= 0.7\)â is not available
trying URL 'http://R-Forge.R-project.org/src/contrib/quantstrat\_0.3.tar.gz'
Content type 'application/x-gzip' length 41494 bytes \(40 Kb\)
opened URL
==================================================
downloaded 40 Kb


The downloaded packages are in
	â/tmp/RtmpTKNnvi/downloaded\_packagesâ
Warning message:
In install.packages\("quantstrat", repos = "http://R-Forge.R-project.org",  :
installation of package 'quantstrat' had non-zero exit status



However, if I do the same within the R shell directly I get a much more informative error:

install.packages\("quantstrat", repos="http://R-Forge.R-project.org", type="source"\)
Warning in install.packages\("quantstrat", repos = "http://R-Forge.R-project.org",  :
argument 'lib' is missing: using '/home/bmccann/R/i486-pc-linux-gnu-library/2.11'
Warning: dependency \u2018blotter \(>= 0.7\)\u2019 is not available
trying URL 'http://R-Forge.R-project.org/src/contrib/quantstrat\_0.3.tar.gz'
Content type 'application/x-gzip' length 41494 bytes \(40 Kb\)
opened URL
==================================================
downloaded 40 Kb

\* installing \*source\* package \u2018quantstrat\u2019 ...
\*\* R
\*\* data
\*\* demo
\*\* inst
\*\* preparing package for lazy loading
Loading required package: zoo
Error : package 'blotter' 0.6 was found, but >= 0.7 is required by 'quantstrat'
ERROR: lazy loading failed for package \u2018quantstrat\u2019
\* removing \u2018/home/bmccann/R/i486-pc-linux-gnu-library/2.11/quantstrat\u2019
\* restoring previous \u2018/home/bmccann/R/i486-pc-linux-gnu-library/2.11/quantstrat\u2019

The downloaded packages are in
	\u2018/tmp/RtmpHhKZqp/downloaded\_packages\u2019
Warning message:
In install.packages\("quantstrat", repos = "http://R-Forge.R-project.org",  :
installation of package 'quantstrat' had non-zero exit status
Comment 1 Thomas Friedrichsmeier 2010-09-01 14:28:16 UTC
Hi,

thanks for reporting this issue. The more generic problem is that output generated by external commands simply does not appear in the console. E.g.
system \("ls"\)
will not produce any visible output. The specific issue you report is just a symptom of this, although a particularly annoying symptom, indeed. R is not friendly to GUIs at this point, although it may be possible for us to hack around this problem.

See also the option "show.output.on.console" of system\(\), which is only implemented on Windows, unfortunately.


\-- Technical notes:

One approach could be to override system\(\), adding some wrapper mini-app to each command which captures the output and relays it to RKWard \(only if intern==FALSE and wait==TRUE\).
Comment 2 Thomas Friedrichsmeier 2010-09-01 14:28:16 UTC
- **summary**: install.packages swallows error messages --> output of system commands is not shown
Comment 3 Thomas Friedrichsmeier 2010-11-19 12:14:43 UTC
Just a short note to let you know that I've made some progress on this.

Output of system commands \(such as during package installation\) will now be shown in the R Console. However, the interleaving \(i.e. showing the output at the right place, and for the right command\) is not entirely correct in some cases, yet.

\--- Technical note:
Probably we need to override system to
\- flush all other output before a system command is run
\- somehow flush stdout / stderr after the command has been run
Comment 4 Thomas Friedrichsmeier 2011-01-09 11:27:49 UTC
The problem should now be fully fixed on both Linux/UNIX and Windows, in the current development version.

If you would like to give it a try, see http://p.sf.net/rkward/svn , or - if you are using Ubuntu - try tomorrow's daily build: https://launchpad.net/~rkward-devel/+archive/rkward-dailys .
Comment 5 Thomas Friedrichsmeier 2011-01-09 11:27:49 UTC
- **assigned_to**: nobody --> tfry
- **summary**: output of system commands is not shown --> FIXED IN SVN: output of system commands is not shown
- **status**: open --> open-fixed
Comment 6 Thomas Friedrichsmeier 2011-03-20 11:27:51 UTC
- **status**: open-fixed --> closed-fixed