FS#50121 - [pacman] Support {oldversion} as a magic version string in the conflicts array specification
Attached to Project:
Arch Linux
Opened by Behnam Momeni (sbmomeni) - Thursday, 21 July 2016, 19:02 GMT
Last edited by Allan McRae (Allan) - Thursday, 21 July 2016, 23:16 GMT
Opened by Behnam Momeni (sbmomeni) - Thursday, 21 July 2016, 19:02 GMT
Last edited by Allan McRae (Allan) - Thursday, 21 July 2016, 23:16 GMT
|
Details
Background:
Upgrading the kernel package causes two main problems: 1. It removes modules of the currently running kernel and so breaks many things until the next reboot, 2. If the new kernel has any regression, it is not possible to fallback to the previous version as it is removed. There is a 7 year open issue <https://bugs.archlinux.org/task/16702> for supporting versioned kernel installs and solving these issues. Solving the first issue is too much hackery as it needs keeping modules from a removed package and not removing them until a successful boot to the new kernel. Not mentioning complexities which arise after hibernate (requiring booting the old kernel again), updating or downgrading to yet another kernel version before booting the new kernel, and so on. Solving the second issue (which also resolves the first issue automatically) is possible by creating a virtual kernel package, namely linux-virtual, which depends on the latest version of the real kernel package similar to what is done in other distributions. But this leaves old kernels in the /boot and the user is expected to uninstall them manually. This can be a problem specially when the /boot is low on disk space and so prevents automatic updates. One proposal for solving both of above issues is described at this comment: <https://bugs.archlinux.org/task/16702#comment149162>. That solution removes the old kernel packages by declaring them in the conflicts array of the linux-virtual package. The problem: Assume that a user has installed linux=X (version X of linux package), skipped some other kernel upgrades, and now wants to upgrade to linux=X+k package. The ideal scenario is to have the conflicts=("linux-real<X") in the linux-virtual=X+k package so it keeps the version X, installs the version X+k and removes all older versions. Reversely, if the user wants to downgrade to linux-virtual=X-k package, the rule should be like conflicts=("linux-real<X-k") instead. But the "k" is unknown when the linux-virtual package is being built. The solution: The linux-virtual=X+k package could declare conflicts=("linux-real<{oldversion}") to declare conflict with all packages which are older than {oldversion} == MIN VERSION OF (The currently being installed package, The currently installed package). |
This task depends upon
Closed by Allan McRae (Allan)
Thursday, 21 July 2016, 23:16 GMT
Reason for closing: Won't implement
Additional comments about closing: This seems like a hack to fix poor packaging.
Thursday, 21 July 2016, 23:16 GMT
Reason for closing: Won't implement
Additional comments about closing: This seems like a hack to fix poor packaging.