do not remove packages when auto-upgrading

Bug #245440 reported by Rehan Khan
4
Affects Status Importance Assigned to Milestone
Smart Package Manager
New
Wishlist
Unassigned

Bug Description

Imported: http://tracker.labix.org/issue204

Reason: Review Patch

further details: https://blueprints.launchpad.net/smart/+spec/bug-reporting-migration

msg694 (view) Author: pitrou Date: 2006-09-03.19:50:06

Here is a simple patch against 0.42 that implements PolicyUpgradeWithoutRemove
without adding any generic obsoletes support.

msg693 (view) Author: pitrou Date: 2006-09-03.19:15:08

Hmm, ok, got into the code.
I first tried to create a PolicyUpgradeWithoutRemove, but it's not sufficient.
One has to modify Translation._install in the part that "removes packages with
the same name that can't coexist with this one", so to distinguish between
really locked packages (locked in a given version) and "soft-locked" (locked
only by name).

Current interaction between Translation and Policy objects is not fine-grained
enough. Can I add a field in Policy to support desired behaviour by listing
soft-locked packages (protected by name)?

By the way, the RPM format has a notion of "obsoletes" packages which may be
relevant here. But, AFAIU by reading the code, the obsoletes info is simply
added to the conflict info, while there may be some semantic difference:
removing an obsolete package shouldn't do harm while removing a conflicting
package probably does.

What do you think? Am I totally off base?

msg692 (view) Author: pitrou Date: 2006-09-03.17:02:57

There is a very nice feature in urpmi : "urpmi --auto-select --keep". This means
upgrade all packages for which there is a newer version available, /except/ when
this would entail removing another package (e.g. because of requirements no
longer fulfilled). It is very handy because often in Mandriva Cooker some
upgrades have wrong metadata (e.g. at this very moment doing a blind upgrade
would lose several important apps), so without this option you would have to
manually choose those packages which are safe to upgrade.

It would be nice to have the same option in smart. I tried looking in the Python
code (transaction.py) but the lack of comments is making it difficult to
understand exactly how it works...

Revision history for this message
Rehan Khan (rasker) wrote :
Rehan Khan (rasker)
Changed in smart:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.