bugGNU Octave - Bugs: bug #43557, pkg install -local ... followed by...

 
 

bug #43557: pkg install -local ... followed by pkg uninstall not working

Submitter:  Muhali <muhali>
Submitted:  Fri 07 Nov 2014 08:58:46 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 02 Sep 2018 03:27:55 PM UTC, comment #6: 

This has been fixed since 4.2.0.  The part about libraries not be reloaded due to existing references can be fixed, as Philip suggested, by clearing the symbol table of references to binary functions in the Octave Forge package.  I used 'clear all' for simplicity during testing, but obviously it should be the much smaller list of binary functions associated with the OF pkg.

This should be reported as a new bug.  The obvious fix will be in the uninstall script for pkg.

Rik <rik5>
Group administrator
Sat 17 Dec 2016 05:43:25 PM UTC, comment #5: 

I think that what happens during installation is that when package documentation is built, doc strings are pulled from the binary modules as well. That means that they're loaded too and never unloaded, and that is the reason the uninstall fails.

I do not know if explicitly calling

clear -f <all binary funcs from an OF pkg>


from e.g., PKG_DEL would help as TTBOMK PKG_DEL isn't invoked during package installation (or uninstallation).

Philip Nienhuis <philipnienhuis>
Group Member
Fri 16 Dec 2016 10:20:13 PM UTC, comment #4: 

This issue might be FIXED in Octave 4.2.0.

I can do the following without any problems:

>> pkg install -local -forge io
For information about changes from previous versions of the io package, run 'news io'.
>> pkg uninstall -local io
>>


Only when I re-install the very same package afterwards once again I run into (minor) trouble:

>> pkg install -local -forge io
For information about changes from previous versions of the io package, run 'news io'.
>> pkg uninstall -local io
>> pkg install -local -forge io
warning: library /home/hartmut/octave/io-2.4.5/x86_64-pc-linux-gnu-api-v51/cell2csv.oct not reloaded due to existing references
warning: library /home/hartmut/octave/io-2.4.5/x86_64-pc-linux-gnu-api-v51/col2num.oct not reloaded due to existing references
warning: library /home/hartmut/octave/io-2.4.5/x86_64-pc-linux-gnu-api-v51/csv2cell.oct not reloaded due to existing references
warning: library /home/hartmut/octave/io-2.4.5/x86_64-pc-linux-gnu-api-v51/csvconcat.oct not reloaded due to existing references
warning: library /home/hartmut/octave/io-2.4.5/x86_64-pc-linux-gnu-api-v51/csvexplode.oct not reloaded due to existing references
warning: library /home/hartmut/octave/io-2.4.5/x86_64-pc-linux-gnu-api-v51/num2col.oct not reloaded due to existing references
For information about changes from previous versions of the io package, run 'news io'.
>>



Hartmut <hardy>
Sat 08 Nov 2014 03:33:35 PM UTC, comment #3: 

A first conclusion seems to be that it is the binary files ".oct" created during installation that keep hanging.
Why they're being loaded at all during installation if no "-auto" has been specified, nor an autoload flag is present in the package's DESCRIPTION file, is beyond me (and that'd be my fault), but there may well be a valid reason for it.

By coincidence, today I just hit some posts in the maintainers ML on the issue of loaded .oct files:
http://octave.1599824.n4.nabble.com/reverse-of-autoload-td4644524.html#a4644539

Philip Nienhuis <philipnienhuis>
Group Member
Fri 07 Nov 2014 04:59:40 PM UTC, comment #2: 

unloading has no effect, as you said.

But for the other packages (actuarial,...) it works.

Muhali <muhali>
Fri 07 Nov 2014 11:50:59 AM UTC, comment #1: 

Did you do

"pkg unload io"

before trying to uninstall? (I see you didn't specify "-auto" so I don't expect much different behavior)

Does it happen for other OF packages as well?

Maybe it is caused by some .oct files being loaded - on Windows those files are usually locked by the system.
The io package PKG_ADD command runs a few tests, but AFAIK not invoking binary modules.

Could you also try with an OF package containing only script files? E.g., (AFAICS) one of the following:
actuarial
data-smoothing
fuzzy-logic
statistics


Philip Nienhuis <philipnienhuis>
Group Member
Fri 07 Nov 2014 08:58:46 AM UTC, original submission:  

If one installs a package locally, e.g.

pkg install -local -forge io

and immediately uninstalls it, one gets

octave> pkg uninstall -local io
error: couldn't delete directory /home/me/octave/io-2.2.4: Directory not empty
error: called from:
error:   /usr/local/octave-dev/share/octave/4.1.0+/m/pkg/private/uninstall.m at line 115, column 9
error:   /usr/local/octave-dev/share/octave/4.1.0+/m/pkg/pkg.m at line 413, column 7

If octave is closed in between, it works. And it works generally for global installations.

Muhali <muhali>

 

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

Attach Files:
   
   
Comment:
   

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 hardy (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by muhali (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-02 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2016-12-17 philipnienhuis Operating SystemGNU/Linux Any
    2015-02-22 mtmiller CategoryNone Octave Function
        Item GroupNone Incorrect Result

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code