FS#32278 - [pacman] Update/release minor version with "Ensure pre_upgrade scriptlet gets old package version"

Attached to Project: Arch Linux
Opened by John (graysky) - Monday, 29 October 2012, 14:58 GMT
Last edited by Allan McRae (Allan) - Friday, 16 November 2012, 11:19 GMT
Task Type Support Request
Category Packages: Core
Status Closed
Assigned To Dan McGee (toofishes)
Allan McRae (Allan)
Dave Reisner (falconindy)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

As described and as fixed in the below commit, pacman 4.0.3 returns a null for $2 during a package update. This is a key functionality for users this logic in a package.install. Please add this to and push an iterative release of pacman to [core] at your earliest convenience.

Thank you and keep up the great work!

https://projects.archlinux.org/pacman.git/commit/?h=maint&id=1bf05e706b5edac92e9c913a69ca8686c6440f8b

Additional info:
* package version(s) 4.0.3-3
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 16 November 2012, 11:19 GMT
Reason for closing:  Fixed
Additional comments about closing:  4.0.3-4 in [testing]
Comment by John (graysky) - Monday, 29 October 2012, 15:25 GMT
There is a work-around for this users can place into their pkg.install files:
https://bbs.archlinux.org/viewtopic.php?pid=1183493

Example:
pre_upgrade() {
# $2 is unset due to a bug. See, https://bugs.archlinux.org/task/32278
# Query current version using pacman as fallback
tempfix=$(pacman -Qi profile-sync-daemon | awk '/^Version/{print $3}')
oldpkgver=${tempfix%-*}

#oldpkgver=${2%-*}
newpkgver=${1%-*}

Loading...