octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54224] pkg install fail to detect globs in oc


From: anonymous
Subject: [Octave-bug-tracker] [bug #54224] pkg install fail to detect globs in octave 4.4.0
Date: Sun, 1 Jul 2018 21:26:47 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

URL:
  <http://savannah.gnu.org/bugs/?54224>

                 Summary: pkg install fail to detect globs in octave 4.4.0
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mon 02 Jul 2018 01:26:46 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.0
        Operating System: Any

    _______________________________________________________

Details:

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 @@
         else
           ## 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)






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54224>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]