patchGNU Octave - Patches: patch #8177, hook function to handle missing...

 
 

patch #8177: hook function to handle missing Octave components

Submitter:  Mike Miller <mtmiller>
Submitted:  Wed 11 Sep 2013 01:16:27 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  mtmiller Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 29 Sep 2013 09:26:42 PM UTC, comment #3: 

I only heard positive feedback so I went ahead and pushed this change:

http://hg.savannah.gnu.org/hgweb/octave/rev/21656a949661

Mike Miller <mtmiller>
Group Member
Wed 11 Sep 2013 12:45:26 PM UTC, comment #2: 

Oops, certainly, attached now.

(file #29104)

Mike Miller <mtmiller>
Group Member
Wed 11 Sep 2013 08:59:32 AM UTC, comment #1: 

Thanks for this proposal, which seems very elegant.

For it to be complete, could you please also attach the distro_missing_handler.m file that you used in your example?

Rafael Laboissière <rlaboiss>
Wed 11 Sep 2013 01:16:27 AM UTC, original submission:  

I'm looking for comments on this enhancement I've worked out with some help from the Debian Octave Group. Please comment, let me know if this is reasonable or the completely wrong approach, or if you think it won't help solve anything at all.

The purpose of this change is to allow distributions and other binary packagers of Octave to install an error handler that will help explain to users how to get some pieces of Octave that may be missing from the way Octave is installed on a given distribution. We continue to get the same questions on the Octave help mailing list about the most common problem, mkoctfile not being installed when users try to build oct files or install Forge packages. This should help address those kinds of questions.

Here's a sample Octave session with my patch applied that should help explain what I'm going for. I have done a make install into /opt/gnu/octave and subsequently deleted the files mkoctfile-3.7.6+ and octave.info*.


## No hook function installed by default, default error messages will be displayed
octave:1> missing_component_hook
ans =
octave:2> mkoctfile octtest.cc
error: mkoctfile: unable to find the mkoctfile command, Octave installation is incomplete
octave:2> pkg install -forge image
pkg: unable to find the mkoctfile command, Octave installation is incomplete
error: called from '__gripe_missing_component__' in file /opt/gnu/octave/share/octave/3.7.6+/m/help/__gripe_missing_component__.m near line 53, column 3
error: called from:
error:   /opt/gnu/octave/share/octave/3.7.6+/m/pkg/private/install.m at line 199, column 5
error:   /opt/gnu/octave/share/octave/3.7.6+/m/pkg/pkg.m at line 394, column 9
octave:2> doc erfc
error: doc: unable to find the Octave info manual, Octave installation is incomplete

## Now an example distribution-specific error handler I wrote
octave:2> missing_component_hook ("distro_missing_handler");

octave:3> mkoctfile octtest.cc
error: mkoctfile: please install the distro package "octave-dev" to get the mkoctfile command
octave:3> doc erfc
error: doc: please install the distro package "octave-info" to get the Octave manual
octave:3> pkg install -forge image
pkg: please install the distro package "octave-dev" to get the mkoctfile command
error: called from '__gripe_missing_component__' in file /opt/gnu/octave/share/octave/3.7.6+/m/help/__gripe_missing_component__.m near line 53, column 3
error: called from:
error:   /opt/gnu/octave/share/octave/3.7.6+/m/pkg/private/install.m at line 199, column 5
error:   /opt/gnu/octave/share/octave/3.7.6+/m/pkg/pkg.m at line 394, column 9


Mike Miller <mtmiller>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29104:  distro_missing_handler.m added by mtmiller (1KiB - text/x-objcsrc)
file #29094:  missing-components.patch added by mtmiller (6KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rlaboiss (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-29 mtmiller StatusNone Done
        Assigned toNone mtmiller
        Open/ClosedOpen Closed
    2013-09-11 mtmiller Attached File- Added distro_missing_handler.m, #29104
    2013-09-11 mtmiller Attached File- Added missing-components.patch, #29094

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code