bugGNU Octave - Bugs: bug #33109, help doesn't work if current...

 
 

bug #33109: help doesn't work if current directory is not writable

Submitted by:  Stephen Montgomery-Smith <stephenms>
Submitted on:  Sun 17 Apr 2011 07:24:34 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Stephen Montgomery-SmithOpen/Closed: Closed
Release: 3.2.4Operating System: BSD

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 17 Apr 2011 09:33:42 PM UTC, comment #3:

I agree.

Stephen Montgomery-Smith <stephenms>
Sun 17 Apr 2011 08:42:36 PM UTC, comment #2:

Thanks for the report. The development sources already appear to have this patched in a similar fashion. You can see the current version here.

http://hg.savannah.gnu.org/hgweb/octave/file/708186085e0d/scripts/help/__makeinfo__.m#l90

I am closing this bug as invalid for the dev sources. I hope you agree.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Sun 17 Apr 2011 07:27:41 PM UTC, comment #1:

Sorry, I mangled the diff

+verbitim+
diff -ur scripts/help-orig/__makeinfo__.m scripts/help/__makeinfo__.m
--- scripts/help-orig/__makeinfo__.m 2011-04-17 18:11:18.000000000 +0000
+++ scripts/help/__makeinfo__.m 2011-04-17 18:10:02.000000000 +0000
@@ -124,7 +124,7 @@

unwind_protect
## Write Texinfo to tmp file
- [fid, name, msg] = mkstemp ("octave_help_XXXXXX", true);
+ [fid, name, msg] = mkstemp (sprintf("%s/octave_help_XXXXXX",P_tmpdir()), true);
fwrite (fid, text);
fclose (fid);

-verbitim-

Stephen Montgomery-Smith <stephenms>
Sun 17 Apr 2011 07:24:34 PM UTC, original submission:

+verbitim+
cd /a-directory-without-write-permissions
octave --eval "help inv"
-verbitim-

gives some horrible error messages.

Here is the fix:

+verbitim+
diff -ur scripts/help-orig/__makeinfo__.m scripts/help/__makeinfo__.m
--- scripts/help-orig/__makeinfo__.m 2011-04-17 18:11:18.000000000 +0000
+++ scripts/help/__makeinfo__.m 2011-04-17 18:10:02.000000000 +0000
@@ -124,7 +124,7 @@

unwind_protect
## Write Texinfo to tmp file
- [fid, name, msg] = mkstemp ("octave_help_XXXXXX", true);
+ [fid, name, msg] = mkstemp (sprintf("%s/octave_help_XXXXXX",P_tmpdir()), tr
ue);
fwrite (fid, text);
fclose (fid);
-verbitim-

It is important to fix this problem, because it plays havoc with the FreeBSD tinderbox build system.

Stephen Montgomery-Smith <stephenms>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by stephenms (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 17 Apr 2011 08:42:36 PM UTCjordighStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1