FS#55534 - Replaced package retained and upgraded as dep causes errors

Attached to Project: Pacman
Opened by Jan Alexander Steffens (heftig) - Wednesday, 06 September 2017, 09:48 GMT
Last edited by Andrew Gregory (andrewgregory) - Tuesday, 25 December 2018, 18:13 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To Andrew Gregory (andrewgregory)
Architecture All
Severity Medium
Priority Normal
Reported Version 5.0.1
Due in Version 5.1.2
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I ran into a problem with replaces after splitting flatpak-builder from flatpak:

- flatpak 0.9.8-1 is installed.
- flatpak 0.9.10-2 and flatpak-builder 0.9.9-1 are available.
- flatpak-builder has replaces=('flatpak<0.9.10') and depends=(flatpak)

If the user confirms the replace, pacman will first remove flatpak and later upgrade it, throwing two errors:

error: could not remove database entry flatpak-0.9.8-1
error: could not remove entry 'flatpak' from cache

The upgrade seems to work fine except for the noise. Perhaps this would cause more problems if flatpak had more complex pre/post scripts, as this bug probably triggers unwanted runs of the install and remove functions.
This task depends upon

Closed by  Andrew Gregory (andrewgregory)
Tuesday, 25 December 2018, 18:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  v5.1.2
Comment by Andrew Gregory (andrewgregory) - Wednesday, 06 September 2017, 12:15 GMT
The bug is just that pacman tries to remove the package twice; it has nothing to do with running remove/install scripts. Running remove and then install scripts in this case is the correct thing to do.

Loading...