[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #39392] geometry package: loading/unloading th
From: |
Rafael Laboissiere |
Subject: |
[Octave-bug-tracker] [bug #39392] geometry package: loading/unloading the package may clobber user variables |
Date: |
Tue, 02 Jul 2013 06:40:57 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?39392>
Summary: geometry package: loading/unloading the package may
clobber user variables
Project: GNU Octave
Submitted by: rlaboiss
Submitted on: Tue 02 Jul 2013 06:40:56 AM GMT
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
When loading/unloading the geometry package, some variables defined by the
users may be clobbered, like in the example below:
octave:1> pkg unload geometry
octave:2> ii = 0;
octave:3> pkg load geometry
octave:4> ii
error: 'ii' undefined near line 4 column 1
This happens because the scripts PKG_{ADD,DEL} use and clear a series of
variables. One possible solution for the problem is provided in the patch
attached to this bug report. This patch is pretty minimal and just wraps the
commands in both PKG_ADD and PKG_DEL inside functions with quite "unlikely"
names __geometry_pkg_{add,del}__, which are called afterwards. These functions
are cleared at the end of the scripts.
This problem also affects other Octave-Forge packages. I will try to track
them down soon.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 02 Jul 2013 06:40:56 AM GMT Name: unintrusive-pkg-add-del.patch
Size: 1kB By: rlaboiss
Patch for PKG_ADD and PKG_DEL
<http://savannah.gnu.org/bugs/download.php?file_id=28475>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39392>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #39392] geometry package: loading/unloading the package may clobber user variables,
Rafael Laboissiere <=