[rkward-tracker] [ rkward-Bugs-3050970 ] FIXED IN SVN: output of system commands is not shown

SourceForge.net noreply at sourceforge.net
Sun Jan 9 12:27:49 UTC 2011


Bugs item #3050970, was opened at 2010-08-22 21:14
Message generated for change (Comment added) made by tfry
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=459007&aid=3050970&group_id=50231

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Benjamin McCann (chengas123)
>Assigned to: Thomas Friedrichsmeier (tfry)
>Summary: FIXED IN SVN: output of system commands is not shown

Initial Comment:
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 By: Thomas Friedrichsmeier (tfry)
Date: 2011-01-09 13:27

Message:
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 By: Thomas Friedrichsmeier (tfry)
Date: 2010-11-19 14:14

Message:
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 By: Thomas Friedrichsmeier (tfry)
Date: 2010-09-01 17:28

Message:
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).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=459007&aid=3050970&group_id=50231




More information about the rkward-tracker mailing list