bugGNU Octave - Bugs: bug #57826, pkg: install extracts docstrings...


bug #57826: pkg: install extracts docstrings from all m-files files recursively

Submitter:  Mike Miller <mtmiller>
Submitted:  Sat 15 Feb 2020 09:22:02 PM UTC
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Mon 04 May 2020 09:32:31 PM UTC, comment #1: 

Also affected by this, 'pkg install' may find incompatible oct files under the or any arbitrary other files that contain something that looks like it should be an Octave file, which could cause a docstring extraction error.

Found when trying to install the same package for use by multiple versions of Octave at the same time. Octave errors when it finds oct files that were compiled for a different API version, even though they are in a correctly labeled API directory.

Mike Miller <mtmiller>
Group Member
Sat 15 Feb 2020 09:22:02 PM UTC, original submission:  

When installing a package, the local function 'generate_lookfor_cache' uses 'genpath' to find all subdirectories of a package when extracting docstrings.

A package may contain an 'inst' directory with subdirectories that aren't added to the load path when the package is actually used, and they should not be included in the docstring cache.

So ideally, the 'generate_lookfor_cache' will call 'addpath' to determine which subdirectories are actually going to be added to the path (e.g. with PKG_ADD).


  • A package may have an 'inst/contrib', 'inst/examples', or 'inst/legacy' subdirectory with m-files that the maintainer doesn't want added to the load path by default.
  • A package may have an 'inst/octave-7' subdirectory with m-files copied from a newer version of Octave that should only be loaded conditionally.

See https://github.com/apjanke/octave-testify/issues/95

Mike Miller <mtmiller>
Group Member


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


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 group members can vote.


Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2020-02-15 mtmiller Carbon-CopyRemoved 80942 -

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code