https://bugzilla.novell.com/show_bug.cgi?id=637211
https://bugzilla.novell.com/show_bug.cgi?id=637211#c2
--- Comment #2 from Ricardo Cruz 2010-09-19 21:53:26 UTC ---
Michael, would you like to have a look at the feasibility of this feature
request?
As we've discussed over the mailing list, we could do something like:
unneeded = []
for pkg in zypp.pool():
...# was pkg installed by the user, or the solver?
...if not pkg.onSystemByUser():
.......# it was installed by solver: check if it is still needed
.......needed = False
.......for pkg2 in zypp.pool():
...........if pkg2.requires (pkg):
...............needed = True
...............break
.......if not needed:
...........unneeded.append (pkg)
---
The Achilles' heel on all this is the method "pkg.onSystemByUser()".
Unfortunately, it isn't reliable. It wouldn't matter if it sometimes would
falsely return True. That would just mean that our net wouldn't sometimes catch
all the "unneeded" fish.
My worry is that packages installed by the update applet are marked as if they
were installed by the solver. In such cases, "pkg.onSystemByUser()" would
falsely return False. Therefor, we could show crucial packages as "unneeded",
and wreck the user's system.
One potential solution to this is to check if the package was installed from
the update repository, "http://download.opensuse.org/update/". We could then
assume those packages as being installed by the user. But can the user add
other update repository to the update applet, or is this one repository
hard-coded?
Any other problems I'm not foreseeing? Solutions?
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.