You are not logged in.
According to /usr/share/pacman/proto.install:
## arg 1: the new package version
## arg 2: the old package version
#pre_upgrade() {
# do something here
#}
I understand this to mean that $1 = new version and $2 = old version. In my case, pacman returns a null for $2 when called in this fashion from my package.install:
pre_upgrade() {
newpkgver=${1%-*}
oldpkgver=${2%-*}
echo "dollar 1 is $1"
echo "dollar 2 is $2"
echo "new is $newpkgver"
echo "old is $oldpkgver"
}
I currently have verion 3.16-1 installed.
% pacman -Qm | grep profile-sync
profile-sync-daemon 3.16-1
Here is the output when I ask pacman to install the package I just built. Why is $2 a null?
loading packages...
resolving dependencies...
looking for inter-conflicts...
Targets (1): profile-sync-daemon-4.02-1
Total Installed Size: 0.07 MiB
Net Upgrade Size: 0.05 MiB
Proceed with installation? [Y/n]
(1/1) checking package integrity [##################################################################] 100%
(1/1) loading package files [##################################################################] 100%
(1/1) checking for file conflicts [##################################################################] 100%
dollar 1 is 4.02-1
dollar 2 is
new is 4.02
old is
Last edited by graysky (2012-10-29 15:09:55)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Okay, I understand now what you meant. This seems to be a bug in pacman which was already fixed half a year ago, but for some reason it hasn't been released yet.
Offline
@xduugu - Thank you! How in the world did you find that? Anyway, if I apply that patch, everything works as expected. I will open a flyspray asking for a 4.0.4 to incorporate this patch. Dunno if Allan will do it but I can always ask, right? I do not want to release psd 4.x until this happens.
EDIT: https://bugs.archlinux.org/task/32278
Last edited by graysky (2012-10-29 14:59:11)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I found it when checking the source code (libalpm). For DKMS packages, I am using a workaround: https://wiki.archlinux.org/index.php/DK … f_files.3F
Last edited by Lekensteyn (2012-10-29 14:55:29)
Offline
@Lekensteyn - Excellent find! Thank you!
EDIT: So obvious in retrospect
Last edited by graysky (2012-10-29 15:26:22)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline