bugGNU Octave - Bugs: bug #31946, pkg: better error reporting when...

 
 

bug #31946: pkg: better error reporting when trying to remove system packages

Submitted by:  Orion Poplawski <opoplawski>
Submitted on:  Wed Dec 22 05:03:32 2010  
 
Category: Octave FunctionSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: Orion PoplawskiOpen/Closed: Open
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu Mar 17 12:20:17 2016, comment #10:

I removed the for loop and implemented the comparison of two lists available packages and the list of packages which we want to uninstall using vectors and this is working fine.

neerajbattan <neerajbattan>
Wed Mar 16 19:50:55 2016, comment #9:

The only other comment I have is why the for loop? This seems very simple to vectorize.

Carnë Draug <carandraug>
Project Member
Wed Mar 16 19:45:44 2016, comment #8:

> I guess this is similar to the current case of uninstalling one installed package and one wrong package name.


Another way to see it, is that if there's no error uninstalling a package, pkg says nothing. So if you ask to uninstall two packages and only errors, it complains about that one and says nothing about the other. Sounds like good behaviour to me.

> [...] what the purpose of "delete_idx" versus "delete_idx1" is.


Yeah, what's the deal with that?

Carnë Draug <carandraug>
Project Member
Mon Mar 14 00:13:26 2016, comment #7:

This is an improvement in the right direction. I now see

If I try to uninstall two packages at once, one system-installed and one user-installed, I see

and the optim package is uninstalled. I guess this is similar to the current case of uninstalling one installed package and one wrong package name.

The coding style is mostly right, except for a missing space in "length(", and you inadvertently deleted an extra newline at the end of the file. The naming of the new variables is not at all clear, looking at the code I don't have a hint as to what the purpose of "delete_idx" versus "delete_idx1" is.

Any other reviewers more familiar with pkg.m?

Mike Miller <mtmiller>
Project Administrator
Sat Mar 12 23:00:16 2016, comment #6:

I have changed the old message to new message and now I am also checking whether the package is global or not and if it is not global then it doesn't show the message "no package of that name installed" and if it is global then it gives the message that
"<pkg_name> is a system installed package and cannot be removed by a user" only. Refer to the file:
(file #36591)

neerajbattan <neerajbattan>
Wed Mar 9 17:21:46 2016, comment #5:

Thanks for attempting to fix this. The patch applies, but still needs some logic work to clean up the error reporting.

I now get the following, not much clearer, error listing:

Mike Miller <mtmiller>
Project Administrator
Sun Mar 6 09:13:20 2016, comment #4:

In the file "octave/scripts/pkg/private/uninstall.m" and line number 26 what is the use of the paramater "global_install"?

neerajbattan <neerajbattan>
Sat Mar 5 01:51:53 2016, comment #3:

Packages installed by a system level package manager like rpm, which are essentially global packages, but should not be updated/removed by the octave pkg commands.

Orion Poplawski <opoplawski>
Sat Mar 5 01:18:14 2016, comment #2:

Does it mean global packages?

neerajbattan <neerajbattan>
Sat Mar 5 01:13:22 2016, comment #1:

What is the meaning of system packages here?

neerajbattan <neerajbattan>
Wed Dec 22 05:03:32 2010, original submission:

When a user tries to remove a system installed octave package, they get:

octave:3> pkg uninstall octcdf
warning: some of the packages you want to uninstall are not installed

which is not very helpful. If no package of that name is installed, I would suggest:

warning: no package of that name installed.

If it was a system package:

warning: <package name> is a system installed package and cannot be removed by a user

Orion Poplawski <opoplawski>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36665:  fourth.patch added by neerajbattan (2kB - text/x-patch - carandraug: I removed the for loop and implemented this using vectoring and everthing else is working fine.)
file #36591:  third.patch added by neerajbattan (2kB - text/x-patch)
file #36582:  second.patch added by neerajbattan (1kB - text/x-patch)
file #36548:  first.patch added by neerajbattan (713B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by neerajbattan (Updated the item)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by opoplawski (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Mar 16 22:32:40 2016neerajbattanAttached File-=>Added fourth.patch, #36665
    Wed Mar 9 22:14:22 2016neerajbattanAttached File-=>Added third.patch, #36591
    Wed Mar 9 16:58:50 2016neerajbattanAttached File-=>Added second.patch, #36582
    Fri Mar 4 17:44:37 2016neerajbattanAttached File-=>Added first.patch, #36548
    Mon Oct 28 03:17:33 2013mtmillerCategoryInterpreter=>Octave Function
      Severity3 - Normal=>1 - Wish
      Item GroupPerformance=>Incorrect Result
      StatusNone=>Confirmed
      Release3.3.54=>dev
      Operating SystemGNU/Linux=>Any
      SummaryNeed better message when trying to remove system packages=>pkg: better error reporting when trying to remove system packages

    Back to the top


    Powered by Savane 3.1-cleanup