|
From: | Mike Miller |
Subject: | [Octave-bug-tracker] [bug #57535] PKG_DEL is not sourced when path() removes a directory from the load path |
Date: | Fri, 3 Jan 2020 17:52:52 -0500 (EST) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36 |
URL: <https://savannah.gnu.org/bugs/?57535> Summary: PKG_DEL is not sourced when path() removes a directory from the load path Project: GNU Octave Submitted by: mtmiller Submitted on: Fri 03 Jan 2020 02:52:50 PM PST Category: Interpreter Severity: 3 - Normal Priority: 5 - Normal Item Group: Feature Request Status: None Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: dev Operating System: Any _______________________________________________________ Details: For symmetry, the PKG_DEL file in a directory should be sourced when a directory is removed from the load path as a side effect of calling path(). Here is an example that expresses the problem and the asymmetry: >> orig_path = path (); >> addpath /tmp/mypath Adding /tmp/mypath to the load path >> with_path = path (); >> rmpath /tmp/mypath Removing /tmp/mypath from the load path >> path (orig_path); >> path (with_path); Adding /tmp/mypath to the load path >> path (orig_path); >> path (orig_path); >> path (with_path); Adding /tmp/mypath to the load path >> path (with_path); Adding /tmp/mypath to the load path >> path (orig_path); >> path (orig_path); The PKG_ADD and PKG_DEL files (each containing just a disp) are each executed when the user calls addpath() and rmpath() on the directory in question. The PKG_ADD file is also sourced when the user calls path() to set an entire path string and the new path contains /tmp/mypath. However, the PKG_DEL file is *not* sourced when the user sets a new path() that does not contain /tmp/mypath and the previous path did contain it. I believe path() needs to check for directories removed by assigning a new full load path for full symmetry and reliability of the PKG_ADD and PKG_DEL features. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?57535> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |