bugGNU Octave - Bugs: bug #57983, addpath with a relative directory...

 
 

bug #57983: addpath with a relative directory causes load-path warnings

Submitter:  Robert Jenssen <morgawr>
Submitted:  Wed 11 Mar 2020 03:28:10 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 5.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 16 Mar 2020 05:46:20 PM UTC, comment #4: 

Thanks, that looks identical to this bug. Closing as a duplicate of bug #52598.

Mike Miller <mtmiller>
Group Member
Thu 12 Mar 2020 06:06:11 PM UTC, comment #3: 

This might be related to bug #52598.

From the description there, it seems recent Matlab versions add the absolute (canonicalized?) path when calling addpath with a relative path.

Markus Mützel <mmuetzel>
Group administrator
Wed 11 Mar 2020 04:42:07 AM UTC, comment #2: 

Thank you for the bug report. This is confirmed, but doesn't really have anything to do with the command line option. This is really about the 'addpath' function with an argument that is a relative directory name.

For example:


mkdir /tmp/xyz
cd /tmp
addpath xyz
cd


What does Matlab's addpath function do with relative directory arguments? Does it expand to the full canonical directory name before adding it to the path? Or does it do what Octave does? Is there a warning when the working directory is changed after doing so?

Mike Miller <mtmiller>
Group Member
Wed 11 Mar 2020 03:42:23 AM UTC, comment #1: 

I should add that load-path does not remove "xyz" from the path:

$ octave-cli -q -p xyz
octave:1> path

Octave's search path contains the following directories:

.
xyz
/usr/local/octave-5.2.0/lib/octave/5.2.0/site/oct/x86_64-pc-linux-gnu
/usr/local/octave-5.2.0/lib/octave/site/oct/api-v53/x86_64-pc-linux-gnu
/usr/local/octave-5.2.0/lib/octave/site/oct/x86_64-pc-linux-gnu
/usr/local/octave-5.2.0/share/octave/5.2.0/site/m
/usr/local/octave-5.2.0/share/octave/site/api-v53/m
/usr/local/octave-5.2.0/share/octave/site/m
/usr/local/octave-5.2.0/share/octave/site/m/startup
/usr/local/octave-5.2.0/lib/octave/5.2.0/oct/x86_64-pc-linux-gnu
/usr/local/octave-5.2.0/share/octave/5.2.0/m
/usr/local/octave-5.2.0/share/octave/5.2.0/m/audio
/usr/local/octave-5.2.0/share/octave/5.2.0/m/deprecated
/usr/local/octave-5.2.0/share/octave/5.2.0/m/elfun
/usr/local/octave-5.2.0/share/octave/5.2.0/m/general
/usr/local/octave-5.2.0/share/octave/5.2.0/m/geometry
/usr/local/octave-5.2.0/share/octave/5.2.0/m/gui
/usr/local/octave-5.2.0/share/octave/5.2.0/m/help
/usr/local/octave-5.2.0/share/octave/5.2.0/m/image
/usr/local/octave-5.2.0/share/octave/5.2.0/m/io
/usr/local/octave-5.2.0/share/octave/5.2.0/m/java
/usr/local/octave-5.2.0/share/octave/5.2.0/m/legacy
/usr/local/octave-5.2.0/share/octave/5.2.0/m/linear-algebra
/usr/local/octave-5.2.0/share/octave/5.2.0/m/miscellaneous
/usr/local/octave-5.2.0/share/octave/5.2.0/m/ode
/usr/local/octave-5.2.0/share/octave/5.2.0/m/optimization
/usr/local/octave-5.2.0/share/octave/5.2.0/m/path
/usr/local/octave-5.2.0/share/octave/5.2.0/m/pkg
/usr/local/octave-5.2.0/share/octave/5.2.0/m/plot
/usr/local/octave-5.2.0/share/octave/5.2.0/m/plot/appearance
/usr/local/octave-5.2.0/share/octave/5.2.0/m/plot/draw
/usr/local/octave-5.2.0/share/octave/5.2.0/m/plot/util
/usr/local/octave-5.2.0/share/octave/5.2.0/m/polynomial
/usr/local/octave-5.2.0/share/octave/5.2.0/m/prefs
/usr/local/octave-5.2.0/share/octave/5.2.0/m/profiler
/usr/local/octave-5.2.0/share/octave/5.2.0/m/set
/usr/local/octave-5.2.0/share/octave/5.2.0/m/signal
/usr/local/octave-5.2.0/share/octave/5.2.0/m/sparse
/usr/local/octave-5.2.0/share/octave/5.2.0/m/specfun
/usr/local/octave-5.2.0/share/octave/5.2.0/m/special-matrix
/usr/local/octave-5.2.0/share/octave/5.2.0/m/startup
/usr/local/octave-5.2.0/share/octave/5.2.0/m/statistics
/usr/local/octave-5.2.0/share/octave/5.2.0/m/strings
/usr/local/octave-5.2.0/share/octave/5.2.0/m/testfun
/usr/local/octave-5.2.0/share/octave/5.2.0/m/time
/usr/local/octave-5.2.0/share/octave/5.2.0/data

octave:2> cd ("xyz")
warning: load_path: xyz: No such file or directory
warning: load-path: update failed for 'xyz', removing from path
octave:3> pwd
warning: load_path: xyz: No such file or directory
warning: load-path: update failed for 'xyz', removing from path
ans = /tmp/xyz
octave:4> path
warning: load_path: xyz: No such file or directory
warning: load-path: update failed for 'xyz', removing from path

Octave's search path contains the following directories:

.
xyz
/usr/local/octave-5.2.0/lib/octave/5.2.0/site/oct/x86_64-pc-linux-gnu
/usr/local/octave-5.2.0/lib/octave/site/oct/api-v53/x86_64-pc-linux-gnu
/usr/local/octave-5.2.0/lib/octave/site/oct/x86_64-pc-linux-gnu
/usr/local/octave-5.2.0/share/octave/5.2.0/site/m
/usr/local/octave-5.2.0/share/octave/site/api-v53/m
/usr/local/octave-5.2.0/share/octave/site/m
/usr/local/octave-5.2.0/share/octave/site/m/startup
/usr/local/octave-5.2.0/lib/octave/5.2.0/oct/x86_64-pc-linux-gnu
/usr/local/octave-5.2.0/share/octave/5.2.0/m
/usr/local/octave-5.2.0/share/octave/5.2.0/m/audio
/usr/local/octave-5.2.0/share/octave/5.2.0/m/deprecated
/usr/local/octave-5.2.0/share/octave/5.2.0/m/elfun
/usr/local/octave-5.2.0/share/octave/5.2.0/m/general
/usr/local/octave-5.2.0/share/octave/5.2.0/m/geometry
/usr/local/octave-5.2.0/share/octave/5.2.0/m/gui
/usr/local/octave-5.2.0/share/octave/5.2.0/m/help
/usr/local/octave-5.2.0/share/octave/5.2.0/m/image
/usr/local/octave-5.2.0/share/octave/5.2.0/m/io
/usr/local/octave-5.2.0/share/octave/5.2.0/m/java
/usr/local/octave-5.2.0/share/octave/5.2.0/m/legacy
/usr/local/octave-5.2.0/share/octave/5.2.0/m/linear-algebra
/usr/local/octave-5.2.0/share/octave/5.2.0/m/miscellaneous
/usr/local/octave-5.2.0/share/octave/5.2.0/m/ode
/usr/local/octave-5.2.0/share/octave/5.2.0/m/optimization
/usr/local/octave-5.2.0/share/octave/5.2.0/m/path
/usr/local/octave-5.2.0/share/octave/5.2.0/m/pkg
/usr/local/octave-5.2.0/share/octave/5.2.0/m/plot
/usr/local/octave-5.2.0/share/octave/5.2.0/m/plot/appearance
/usr/local/octave-5.2.0/share/octave/5.2.0/m/plot/draw
/usr/local/octave-5.2.0/share/octave/5.2.0/m/plot/util
/usr/local/octave-5.2.0/share/octave/5.2.0/m/polynomial
/usr/local/octave-5.2.0/share/octave/5.2.0/m/prefs
/usr/local/octave-5.2.0/share/octave/5.2.0/m/profiler
/usr/local/octave-5.2.0/share/octave/5.2.0/m/set
/usr/local/octave-5.2.0/share/octave/5.2.0/m/signal
/usr/local/octave-5.2.0/share/octave/5.2.0/m/sparse
/usr/local/octave-5.2.0/share/octave/5.2.0/m/specfun
/usr/local/octave-5.2.0/share/octave/5.2.0/m/special-matrix
/usr/local/octave-5.2.0/share/octave/5.2.0/m/startup
/usr/local/octave-5.2.0/share/octave/5.2.0/m/statistics
/usr/local/octave-5.2.0/share/octave/5.2.0/m/strings
/usr/local/octave-5.2.0/share/octave/5.2.0/m/testfun
/usr/local/octave-5.2.0/share/octave/5.2.0/m/time
/usr/local/octave-5.2.0/share/octave/5.2.0/data

octave:5>


Robert Jenssen <morgawr>
Wed 11 Mar 2020 03:28:10 AM UTC, original submission:  

The octave-cli command-line argument "-p" causes a spurious warning message. This warning has no id so it cannot be turned off.


$ mkdir xyz
$
$ octave-cli -q
octave:1> version
ans = 5.2.0
octave:2> cd("xyz")
octave:3> pwd
ans = /tmp/xyz
octave:4> exit
$
$ octave-cli -q -p xyz
octave:1> version
ans = 5.2.0
octave:2> cd("xyz")
warning: load_path: xyz: No such file or directory
warning: load-path: update failed for 'xyz', removing from path
octave:3> pwd
warning: load_path: xyz: No such file or directory
warning: load-path: update failed for 'xyz', removing from path
ans = /tmp/xyz
octave:4> [~,id]=lastwarn()
warning: load_path: xyz: No such file or directory
warning: load-path: update failed for 'xyz', removing from path
id =
octave:5> exit
warning: load_path: xyz: No such file or directory
warning: load-path: update failed for 'xyz', removing from path
$


Robert Jenssen <morgawr>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by morgawr (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-03-16 mtmiller StatusNeed Info Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #52598
    2020-03-11 mtmiller Item GroupNone Unexpected Error or Warning
        StatusNone Need Info
        Summary-p command-line argument causes spurious load-path warnings addpath with a relative directory causes load-path warnings

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code