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

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

[Octave-bug-tracker] [bug #60472] pkg -global option changes pkg prefix


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #60472] pkg -global option changes pkg prefix for subsequent calls
Date: Wed, 28 Apr 2021 23:54:45 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?60472>

                 Summary: pkg -global option changes pkg prefix for subsequent
calls 
                 Project: GNU Octave
            Submitted by: nrjank
            Submitted on: Wed 28 Apr 2021 11:54:43 PM EDT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Nicholas Jankowski
        Originator Email: 
             Open/Closed: Open
                 Release: 6.2.0
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Octave on Windows 10.  Tested with the 6.2.0 release and the 6.2.1 build hg
id: 50aa945836c3 Mon, Apr 26, 2021, using the zip installer into userspace
(C:\Octave\octave-*version*).  User has write access to both global and local
package location.

Default install has packages in global location.  User does not have
administrative rights, but does have write access to global package location.
Attempting uninstall without -global flag refuses to do so as expected, and
forcing -global flag does the uninstall:


octave:1> pkg local_list, pkg global_list, __is_elevated_process__
C:\Users\NICHOL~1.JAN\.octave_packages
C:\Programs\Octave\OCTAVE~1\mingw64\share\octave\octave_packages
ans = 0

octave:2> pkg prefix
Installation prefix:             C:\Users\NICHOL~1.JAN\octave
Architecture dependent prefix:   C:\Users\NICHOL~1.JAN\octave

octave:3> pkg list ga
Package Name  | Version | Installation directory
--------------+---------+-----------------------
          ga  |  0.10.2 |
...\octave-dev\mingw64\share\octave\packages\ga-0.10.2

octave:4> pkg uninstall ga
warning: some of the packages you want to uninstall are not installed
warning: called from
    uninstall at line 72 column 7
    pkg at line 582 column 7

warning: no packages will be uninstalled
warning: called from
    uninstall at line 77 column 5
    pkg at line 582 column 7

octave:5> pkg uninstall -global ga
octave:6> pkg list ga
package ga is not installed.


but after that -global, the prefix remains changed:


octave:7> pkg prefix
Installation prefix:            
C:\Programs\Octave\OCTAVE~1\mingw64\share\octave\packages
Architecture dependent prefix:  
C:\Programs\Octave\OCTAVE~1\mingw64\lib\octave\packages

octave:8> __is_elevated_process__
ans = 0

octave:11> pkg install ga-0.10.2.tar.gz
For information about changes from previous versions of the ga package, run
'news ga'.

octave:12> pkg list ga
Package Name  | Version | Installation directory
--------------+---------+-----------------------
          ga  |  0.10.2 |
...\octave-dev\mingw64\share\octave\packages\ga-0.10.2

octave:14> pkg uninstall ga

octave:15> pkg list ga
package ga is not installed.


so it essentially did an install to the global location without me asking and
lets me uninstall as well when that should require a -global option.

Trying to do a global and local install with different versions, things are
weird:


octave:17> pkg install ga-0.10.1.tar.gz
For information about changes from previous versions of the ga package, run
'news ga'.

octave:18> pkg list ga
Package Name  | Version | Installation directory
--------------+---------+-----------------------
          ga  |  0.10.1 |
...\octave-dev\mingw64\share\octave\packages\ga-0.10.1

octave:19> pkg prefix
Installation prefix:            
C:\Programs\Octave\OCTAVE~1\mingw64\share\octave\packages
Architecture dependent prefix:  
C:\Programs\Octave\OCTAVE~1\mingw64\lib\octave\packages

octave:20> pkg install -local ga-0.10.2.tar.gz
For information about changes from previous versions of the ga package, run
'news ga'.

octave:21> pkg list ga
Package Name  | Version | Installation directory
--------------+---------+-----------------------
          ga  |  0.10.2 | C:\Users\nicholas.jankowski\octave\ga-0.10.2

octave:22> pkg prefix
Installation prefix:             C:\Users\NICHOL~1.JAN\octave
Architecture dependent prefix:   C:\Users\NICHOL~1.JAN\octave

octave:23> pkg uninstall ga

octave:24> pkg list ga
package ga is not installed.

octave:25> pkg rebuild

octave:26> pkg list ga
package ga is not installed.


just trying to global uninstall, even if unsuccessful, changes the prefix

octave:27> pkg uninstall -global ga
warning: some of the packages you want to uninstall are not installed
warning: called from
    uninstall at line 68 column 9
    pkg at line 582 column 7

warning: no packages will be uninstalled
warning: called from
    uninstall at line 77 column 5
    pkg at line 582 column 7

octave:28> pkg prefix
Installation prefix:            
C:\Programs\Octave\OCTAVE~1\mingw64\share\octave\packages
Architecture dependent prefix:  
C:\Programs\Octave\OCTAVE~1\mingw64\lib\octave\packages


repeating above, verifying the pkg installation occurs (global location prefix
still set):


octave:29> pkg install ga-0.10.1.tar.gz
For information about changes from previous versions of the ga package, run
'news ga'.
octave:30> pkg list ga
Package Name  | Version | Installation directory
--------------+---------+-----------------------
          ga  |  0.10.1 |
...\octave-dev\mingw64\share\octave\packages\ga-0.10.1



verify ga folder present where stated above


octave:31> pkg install -local ga-0.10.2.tar.gz
For information about changes from previous versions of the ga package, run
'news ga'.

octave:32> pkg list ga
Package Name  | Version | Installation directory
--------------+---------+-----------------------
          ga  |  0.10.2 | C:\Users\nicholas.jankowski\octave\ga-0.10.2


verified local pkg is installed as stated, BUT ga-0.10.1 has been deleted from
global location, as would occur when updating in the same location. hence
after the local uninstall, neither is left.

so, it seems the prefix is being updated and acts as a persistent switch
rather than a temporary change, but my guess is it still logs the pkg in the
local_list .octave_packages? 

(there are enough changes to pkg on the default branch I can't check it
without being set up to recompile, so I can't verify if this persists in that
version, but the pkg code appears the same.)





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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