Ticket #13 (new enhancement)

Opened 3 years ago

Last modified 2 years ago

yum shell: consider current transaction set on update, install and remove

Reported by: bergolth Assigned to: skvidal
Priority: major Milestone:
Component: yum Version: Stable: 3.2.x
Keywords: shell transaction Cc:

Description

It would be nice if the update process checked the current transaction set and only considered packages that are not already candidates for removal. I've attached a patch (yum-update.patch) that seems to work for my test case.

I added this to the "update everything part" (without any packages passed in as arguments) only. If packages are explicitly specified to update, the behavior is the other way around: If those packages are already in the transaction set marked with any of the TS_REMOVE_STATES, the corresponding transaction set members are removed first.

The second patch (yum-consider-tsinfo.patch) is an approach to consider members of the current transaction set on install and remove.

I'd be glad if you could review the patches and tell me if that's the correct way to do it.

Attachments

yum-update.patch (3.0 kB) - added by bergolth on 01/06/09 10:44:12.
only update packages that are not going to be removed in the current transaction
yum-consider-tsinfo.patch (4.0 kB) - added by bergolth on 01/13/09 10:29:58.
also consider transaction set on install and remove (patch should be complete now :-))
yum-3.2.21-consider-ts.patch (4.0 kB) - added by bergolth on 12/29/09 12:07:44.
also consider transaction set on install and remove (yum 3.2.21 to 3.2.24)
yum-3.2.24-update.patch (4.6 kB) - added by bergolth on 12/29/09 12:08:37.
only update packages that are not going to be removed in the current transaction (yum-3.2.24)

Change History

01/06/09 10:44:12 changed by bergolth

  • attachment yum-update.patch added.

only update packages that are not going to be removed in the current transaction

01/06/09 15:58:51 changed by james

I'm pretty sure we want to do this the other way, so instead of:

  • remove X Y Z
  • update (which ignores X Y and Z)

...we'd have:

  • update
  • remove X Y Z (which removes the update objects for same).

01/06/09 17:38:17 changed by bergolth

I think there will be use cases for both ways. Your suggestion should be covered by the second patch. But I think it would be convenient if yum could consider the transaction set on _all_ subsequent manipulations (including update).

Especially when dealing with dist-upgrades and discontinued packages (maybe without correct obsoletes) or packages with broken dependencies, manipulating the transaction set before solving dependencies can prevent much frustration with removing a countless number of packages and readding them after the upgrade.

And since this logic will only be used in shell transactions with multiple operations on non-empty transaction-sets where the user explicitly asks for doing so, it won't harm normal operation.

01/13/09 10:29:58 changed by bergolth

  • attachment yum-consider-tsinfo.patch added.

also consider transaction set on install and remove (patch should be complete now :-))

12/29/09 12:06:34 changed by bergolth

  • priority changed from minor to major.
  • version set to Stable: 3.2.x.

I've added updated patches that work with yum-2.3.24 (Fedora 10). (Use yum-3.2.21-consider-ts.patch and yum-3.2.24-update.patch)

Using those patches, upgrading from Fedora 10 to 12 was just a few yum-shell commands on my box:

upgrade
downgrade mplayer
remove directfb faad2-libs knetworkmanager
remove libvcdinfo0-0.7.23-9.fc12.i686
remove libvcdinfo0-0.7.23-9.fc10.i386 libcdio-0.80-5.fc10.i386
remove dejavu-fonts
run

It would be great if those patched could be integrated.

Cheers,
--leo

P.S.: The following downgrade-patch was also needed to make the dist-upgrade work: http://yum.baseurl.org/ticket/378

12/29/09 12:07:44 changed by bergolth

  • attachment yum-3.2.21-consider-ts.patch added.

also consider transaction set on install and remove (yum 3.2.21 to 3.2.24)

12/29/09 12:08:37 changed by bergolth

  • attachment yum-3.2.24-update.patch added.

only update packages that are not going to be removed in the current transaction (yum-3.2.24)