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 22 Dec 2010 05:03:32 AM UTC  
 
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 17 Mar 2016 12:20:17 PM UTC, 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 16 Mar 2016 07:50:55 PM UTC, 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 16 Mar 2016 07:45:44 PM UTC, 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 14 Mar 2016 12:13:26 AM UTC, 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 12 Mar 2016 11:00:16 PM UTC, 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 09 Mar 2016 05:21:46 PM UTC, 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 06 Mar 2016 09:13:20 AM UTC, 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 05 Mar 2016 01:51:53 AM UTC, 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 05 Mar 2016 01:18:14 AM UTC, comment #2:

Does it mean global packages?

neerajbattan <neerajbattan>
Sat 05 Mar 2016 01:13:22 AM UTC, comment #1:

What is the meaning of system packages here?

neerajbattan <neerajbattan>
Wed 22 Dec 2010 05:03:32 AM UTC, 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 16 Mar 2016 10:32:40 PM UTCneerajbattanAttached File-=>Added fourth.patch, #36665
    Wed 09 Mar 2016 10:14:22 PM UTCneerajbattanAttached File-=>Added third.patch, #36591
    Wed 09 Mar 2016 04:58:50 PM UTCneerajbattanAttached File-=>Added second.patch, #36582
    Fri 04 Mar 2016 05:44:37 PM UTCneerajbattanAttached File-=>Added first.patch, #36548
    Mon 28 Oct 2013 03:17:33 AM UTCmtmillerCategoryInterpreter=>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