bugGNU Octave - Bugs: bug #54898, "diary" function does...

 
 

bug #54898: "diary" function does not save the output of "system" function calls

Submitted by:  Kai Torben Ohlhus <siko1056>
Submitted on:  Fri 26 Oct 2018 11:14:25 AM UTC  
 
Category:  Interpreter Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 23 Nov 2019 09:33:36 PM UTC, comment #2: 

this seems to be related - I noticed that outputs of pkg install are also not captured by diary

the following output:

octave:4> diary on
octave:5> pkg install -verbose parallel-3.1.3.tar.gz
mkdir (c:\Programs\Octave\Temp\oct-YQjsJD)
untar (parallel-3.1.3.tar.gz, c:\Programs\Octave\Temp\oct-YQjsJD)
configure: loading site script /usr/local/etc/config.site
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for mkoctfile... C:/Programs/Octave/OCTAVE~1.0-W/mingw64/bin/mkoctfile-5.1.0.exe --verbose
checking for octave-config... C:/Programs/Octave/OCTAVE~1.0-W/mingw64/bin/octave-config-5.1.0.exe
checking for a sed that does not truncate output... /usr/bin/sed
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking for style of include used by make... GNU

<snip>

make[1]: Leaving directory '/c/Programs/Octave/Temp/oct-YQjsJD/parallel-3.1.3/src/gl'
true # without any recipe, make seemingly doesn't always consider the target to be really re-made after this rule was triggered
cc -c gnulib-wrappers.c -Igl -g -O2 -fPIC
make: cc: Command not found
make: *** [Makefile:163: gnulib-wrappers.o] Error 127
make: Leaving directory '/c/Programs/Octave/Temp/oct-YQjsJD/parallel-3.1.3/src'

pkg: error running `make' for the parallel package.
error: called from
    configure_make at line 99 column 9
    install at line 184 column 7
    pkg at line 441 column 9
octave:5> diary off
octave:6>

is reduced in diary to:

octave:5> pkg install -verbose parallel-3.1.3.tar.gz
mkdir (c:\Programs\Octave\Temp\oct-YQjsJD)
untar (parallel-3.1.3.tar.gz, c:\Programs\Octave\Temp\oct-YQjsJD)

error: called from
    install at line 192 column 5
    pkg at line 441 column 9
pkg: error running `make' for the parallel package.
error: called from
    configure_make at line 99 column 9
    install at line 184 column 7
    pkg at line 441 column 9
octave:5> diary off

Nicholas Jankowski <nrjank>
Tue 30 Oct 2018 03:25:49 PM UTC, comment #1: 

In a similar vein, anything that gets printed to STDERR is also not captured by diary.  Sample session:

octave:1> diary tst.diary
octave:2> x = pi
x =  3.1416
octave:3> y = fprintf (stderr, "Hello World\n");
Hello World
octave:4> diary off

As you can see, in the session, "Hello World" is printed to the screen.  But, the file tst.diary doesn't show it.

octave:2> x = pi
x =  3.1416
octave:3> y = fprintf (stderr, "Hello World\n");
octave:4> diary off

Rik <rik5>
Project Administrator
Fri 26 Oct 2018 11:14:25 AM UTC, original submission:  

A small observation using "diary" and "system" in the following context:

diary somefile.txt
system ("ls -la")
diary off

The resulting file "somefile.txt" contains:

octave:2> system ("ls -la")
ans = 0
octave:3> diary off

In Matlab R2018b you can see the actual file listing as shown inside Octave.

Kai Torben Ohlhus <siko1056>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by siko1056 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-30 rik5 Priority5 - Normal => 3 - Low
        StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.5