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

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

[Octave-bug-tracker] [bug #31946] pkg: better error reporting when tryin


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #31946] pkg: better error reporting when trying to remove system packages
Date: Fri, 30 Jul 2021 06:00:53 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #15, bug #31946 (project octave):

What happened to me when I tried to remove a global package with dev Octave on
Windows also looks interesting: I noted that on my box even the global
octave-packages file was completely gone. I suppose pkg.m was in the middle of
processing it but was then interrupted by some error elsewhere in its logic.

Anyway I figured "no stress, let's just easily recreate that file by a 'pkg
rebuild'". And then landed in an interesting situation:
* I did install Octave as ordinary user - that means I do have all rights to
fiddle around in the global packages store.
* In my .octaverc file I set 'user_prefix' to octave<version>/ in my home
directory and point the local_list file (.octave_packages) to be there as well
(using 'pkg prefix ...' and 'pkg local_list ...'), to separate local packages
installed in various (also quite old) Octave versions.
* That way 'user_prefix' is set before Octave is even fully started.
* Further down in the pkg.m logic the direct way to have 'pkg rebuild'
recreate the global_list (global octave_packages file) is consistently avoided
as long as a user_prefix is set.
* Now, because pkg.m AFAIK offers no way to "unset" a prefix (and the
associated variable 'user_prefix' is a persistent variable), I got stuck a
little bit.

Yeah I know, it's all because I've set 'prefix' (in .octaverc), but the
consequences described above are unintended, undocumented, and actually
illogical - if 'pkg.m' can wipe the global_list, 'pkg rebuild' should also be
able to recreate it, regardless of 'user_prefix' settings. It could well be
that this issue applies only to Windows plus local Octave installation.

I've patched it for myself so that the '-global' flag works also with 'pkg
rebuild' (and for that matter, with 'pkg uninstall').

Some time ago I've dived deep in the pkg.m logic to fix other bugs.
Unfortunately my perception of pkg.m's inner workings has faded a bit; but if
I get more time I might review and fix this & other glitches (I know from
memory there are several more).


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?31946>

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




reply via email to

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