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

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

[Octave-bug-tracker] [bug #57122] pkg uninstall incorrectly errors out o


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #57122] pkg uninstall incorrectly errors out on unrelated dependencies
Date: Sun, 27 Oct 2019 16:26:11 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4

Follow-up Comment #2, bug #57122 (project octave):

Easy enough.

Install just signal with -nodeps flag (as it needs control).
Next, install e.g., ga (has no dependencies and signal doesn't depend on it).
Then:

pkg uninstall ga 

will lead to the error, complaining signal needs control. Of course neither
signal nor control have any relationship with ga.
This scenario may be a little far fetched but if a user has knowingly
installed a package w/o all req'd dependencies, he/she shouldn't be stopped
from uninstalling some unrelated package. IMO it violates the principle of
least surprise.

Of course the workaround is to specify "-nodeps"; but the way the error is
generated is just flawed.


I've already investigated and have some idea of how to fix it.

The current logic is to single out the package(s)-to-be-uninstalled and then
cycle through all the rest and see if any of those remaining package's
dependencies will remain in the set of remaining packages. A bit convoluted,
but it'll work. But: the flaw is that dependencies that were already missing
before the current "pkg uninstall" action are inevitably detected as well and
will lead to an error.

It would be much simpler, more direct and easier to understand to cycle
through the remaining packages but rather check if any of their dependencies
is in the list of packages-to-be-uninstalled.

Admittedly, having looked at the pkg.m code in some detail I think at places
it is very cleverly written but there are ample potential flaws, often based
on undue expectations.
This bug is a fine example: pkg.m expects a consistent package database w/o
lacking dependencies, but users may have their reason to not fulfill all
package dependencies.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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