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: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #31946] pkg: better error reporting when trying to remove system packages
Date: Thu, 29 Jul 2021 23:42:17 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36

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

attached patch (file bug_31946_pkg_uninst_msgs.patch) should apply
successfully to default.  It trims out the section mentioned in comment #13,
and all uninstall tests seem to apply correctly (if anyone can find a test
case that breaks it without that block, let me know), and it provides the
improved messaging that initiated this old bug. if all is good should satisfy
this bug report

tests:
when attempting to uninstall one or more not-installed pkg:

>> pkg uninstall abc
warning: package abc is not installed
warning: no packages will be uninstalled
warning: called from
    uninstall at line 99 column 5
    pkg at line 582 column 7

>> pkg uninstall abc def
warning: package abc is not installed
warning: package def is not installed
warning: no packages will be uninstalled
warning: called from
    uninstall at line 99 column 5
    pkg at line 582 column 7


when trying to uninstall one or more global pkg as local:

>> pkg uninstall audio
warning: audio is a global package and cannot be removed locally
warning: no packages will be uninstalled
warning: called from
    uninstall at line 99 column 5
    pkg at line 582 column 7

>> pkg uninstall audio video
warning: video is a global package and cannot be removed locally
warning: audio is a global package and cannot be removed locally
warning: no packages will be uninstalled
warning: called from
    uninstall at line 99 column 5
    pkg at line 582 column 7


mixing the two: 

>> pkg uninstall abc audio video def
warning: package abc is not installed
warning: package def is not installed
warning: video is a global package and cannot be removed locally
warning: audio is a global package and cannot be removed locally
warning: no packages will be uninstalled
warning: called from
    uninstall at line 99 column 5
    pkg at line 582 column 7


as global:

>> pkg uninstall -global abc def
warning: package abc is not installed
warning: package def is not installed
warning: no packages will be uninstalled
warning: called from
    uninstall at line 99 column 5
    pkg at line 582 column 7

>> pkg list audio
Package Name  | Version | Installation directory
--------------+---------+-----------------------
       audio  |   2.0.2 | ...\mingw64\share\octave\packages\audio-2.0.2

>> pkg uninstall -global audio
>> pkg list audio
package audio is not installed.

>> pkg install -global audio-2.0.2.tar.gz
For information about changes from previous versions of the audio package, run
'n
ews audio'.

>> pkg uninstall -global abc audio
warning: package abc is not installed

>> pkg list audio
package audio is not installed.



local package:


>> pkg install -local audio-2.0.2.tar.gz
For information about changes from previous versions of the audio package, run
'news audio'.

>> pkg list audio video
Package Name  | Version | Installation directory
--------------+---------+-----------------------
       audio  |   2.0.2 | C:\Users\nicholas.jankowski\octave\audio-2.0.2
       video  |   2.0.0 |
C:\Programs\Octave\octave-6.3.0-w64\mingw64\share\octave\packages\video-2.0.0

>> pkg uninstall abc def video audio
warning: package abc is not installed
warning: package def is not installed
warning: video is a global package and cannot be removed locally
                        
>> pkg list audio video
Package Name  | Version | Installation directory
--------------+---------+-----------------------
       video  |   2.0.0 |
C:\Programs\Octave\octave-6.3.0-w64\mingw64\share\octave\packages\video-2.0.0


(file #51706)
    _______________________________________________________

Additional Item Attachment:

File name: bug_31946_pkg_uninst_msgs.patch Size:2 KB
   
<https://file.savannah.gnu.org/file/bug_31946_pkg_uninst_msgs.patch?file_id=51706>



    _______________________________________________________

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]