mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-17 23:05:00 -05:00
d5278ebb3b
This patch offers a way to fix FS#9228. By putting "SyncFirst = pacman" in pacman.conf, the version check will happen before the transaction really starts, and before any replacements is made. Otherwise, no version check is done. The sync301 pactest was updated to use this SyncFirst option. Example session with SyncFirst = pacman, and a newer pacman version available : $ pacman -Su (or pacman -S <any targets>) :: the following packages should be upgraded first : pacman :: Do you want to cancel the current operation :: and upgrade these packages now? [Y/n] resolving dependencies... looking for inter-conflicts... Targets: pacman-x.y.z-t Total Download Size: x.xx MB Total Installed Size: x.xx MB Proceed with installation? [Y/n] n As Nagy previously noted, doing this check on any -S operations might look intrusive, but it can be required. For example, the case where you want to install a package with versioned provisions, using a pacman version which didn't support that feature yet (and there is already a newer pacman in sync db supporting it). Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
28 lines
621 B
Python
28 lines
621 B
Python
self.description = "Sysupgrade : pacman needs to be upgraded and has new deps"
|
|
|
|
sp = pmpkg("pacman", "1.0-2")
|
|
sp.depends = ["dep"]
|
|
self.addpkg2db("sync", sp)
|
|
|
|
spdep = pmpkg("dep")
|
|
self.addpkg2db("sync", spdep)
|
|
|
|
sp1 = pmpkg("pkg1", "1.0-2")
|
|
self.addpkg2db("sync", sp1)
|
|
|
|
lp = pmpkg("pacman", "1.0-1")
|
|
self.addpkg2db("local", lp)
|
|
|
|
lp1 = pmpkg("pkg1", "1.0-1")
|
|
self.addpkg2db("local", lp1)
|
|
|
|
self.option["SyncFirst"] = ["pacman"]
|
|
|
|
self.args = "-Su"
|
|
|
|
self.addrule("PACMAN_RETCODE=0")
|
|
self.addrule("PKG_EXIST=pacman")
|
|
self.addrule("PKG_VERSION=pacman|1.0-2")
|
|
self.addrule("PKG_VERSION=pkg1|1.0-1")
|
|
self.addrule("PKG_EXIST=dep")
|