bugGNU Octave - Bugs: bug #54224, pkg install fail to detect globs...


bug #54224: pkg install fail to detect globs in octave 4.4.0

Submitter:  None
Submitted:  Mon 02 Jul 2018 01:26:46 AM UTC
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.4.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Mon 02 Jul 2018 06:40:50 PM UTC, comment #1: 

I pushed the patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/60e89abe0e61).  It will be a part of the 4.4.1 bug fix release which should be out fairly soon.

Thanks, as always, for the contribution.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 02 Jul 2018 01:26:46 AM UTC, original submission:  

In octave 4.2.x, "pkg install" support globs for local files or directories.
But in octave 4.4.0, when it meets a glob, it will treat it as an external URL, and then raise an error.

This regression is from changeset 24871:ca43264971ea (bug #50632).

Here is a possible patch to re-enable the detection of globs for local files or directories.

--- /usr/share/octave/4.4.0/m/pkg/pkg.m
+++ pkg.m
@@ -413,7 +413,7 @@
           ## If files do not exist, maybe they are not local files.
           ## Try to download them.
-          external_files_mask = ! cellfun (@exist, files, {"file"});
+          external_files_mask = cellfun (@(x) isempty (glob (x)), files);
           if (any (external_files_mask))
             [success, msg] = mkdir (tmp_dir);
             if (success != 1)



(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


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (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 group members can vote.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-02 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code