Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#29731 - pre_upgrade script miss $2 (old version)
Attached to Project:
Pacman
Opened by Sébastien Luttringer (seblu) - Thursday, 03 May 2012, 19:17 GMT
Last edited by Allan McRae (Allan) - Sunday, 31 March 2013, 07:08 GMT
Opened by Sébastien Luttringer (seblu) - Thursday, 03 May 2012, 19:17 GMT
Last edited by Allan McRae (Allan) - Sunday, 31 March 2013, 07:08 GMT
|
DetailsSummary and Info:
Manual page claims there is 2 args in pre_upgrade script. <quote> pre_upgrade Run right before files are extracted. Two arguments are passed in this order: new package full version string, old package full version string. </quote> With the current stable version of pacman, pre_upgrade is called only with new version. This break PKGBUILD which use old version to remove old kernel module (e.g: virtualbox-bin) $ pacman -V .--. Pacman v4.0.3 - libalpm v7.0.3 / _.-' .-. .-. .-. Copyright (C) 2006-2012 Pacman Development Team \ '-. '-' '-' '-' Copyright (C) 2002-2006 Judd Vinet '--' This program may be freely redistributed under the terms of the GNU General Public License. Steps to Reproduce: = First install = $ pacman -U fake-1-1-any.pkg.tar.xz loading packages... resolving dependencies... looking for inter-conflicts... Targets (1): fake-1-1 Proceed with installation? [Y/n] (1/1) checking package integrity [########################################] 100% (1/1) loading package files [########################################] 100% (1/1) checking for file conflicts [########################################] 100% + pre_install 1-1 + echo 1-1 1-1 (1/1) installing fake [########################################] 100% + post_install 1-1 + echo 1-1 1-1 $ pacman -U fake-2-1-any.pkg.tar.xz loading packages... resolving dependencies... looking for inter-conflicts... Targets (1): fake-2-1 Proceed with installation? [Y/n] (1/1) checking package integrity [########################################] 100% (1/1) loading package files [########################################] 100% (1/1) checking for file conflicts [########################################] 100% + pre_upgrade 2-1 + echo 2-1 2-1 (1/1) upgrading fake [########################################] 100% + post_upgrade 2-1 1-1 + echo 2-1 1-1 2-1 1-1 |
This task depends upon
This task blocks these from closing
FS#32266 - [virtualbox] dkms stuff do not get removed on upgrade
Closed by Allan McRae (Allan)
Sunday, 31 March 2013, 07:08 GMT
Reason for closing: Fixed
Additional comments about closing: Git commit 1bf05e70
Sunday, 31 March 2013, 07:08 GMT
Reason for closing: Fixed
Additional comments about closing: Git commit 1bf05e70
PKGBUILD
For DKMS packages, availability of the old version before upgrading is important to clean up mess. I have implemented a workaround for DKMS packages that I maintain:
https://wiki.archlinux.org/index.php/DKMS#How_to_create_.install_.2F_dkms.conf_files.3F
pre_upgrade() {
local curver=${2%%-*}
# $2 is unset due to a bug. Query current version using pacman as fallback
[ -n "$curver" ] || curver=$(pacman -Qi PACKAGE_NAME | awk '/^Version/{print $3}')
pre_remove $curver
}