You are not logged in.
I found this one example:
https://bbs.archlinux.org/viewtopic.php?pid=913891
# In an upgrade from 1.0.1-1 or older, the wireless-regdom file moves from the crda package
# to the new wireless-regdb package. If the user changed the file, it is save to overwrite the one
# from wireless-regdb by the user-defined one
if [ $(vercmp $2 1.0.1-2) -lt 0 ]; then
if [ -f /etc/conf.d/wireless-regdom.pacorig -a -n "$(grep -v ^# /etc/conf.d/wireless-regdom.pacorig 2>/dev/null | grep -v ^$)" ]; then
...
fi
fi
Is that an example of the best practice approach?
In my case, I have this:
# old version is like: 1.0.r53-2 or 1.0.r54-1
# new version is: 1.0.r55-1
## arg 1: the new package version
## arg 2: the old package version
pre_upgrade() {
if [[ $(vercmp "$2" "1.0.r55-1") -lt 0 ]]; then
# do something here;
fi
}
Can that be improved?
BTW, I'm getting a 504 Gateway Time-out when I try to do this search on here:
Keyword search: proto.install new package version
Searched in: Pacman & Package Upgrade Issues, Creating & Modifying Packages
Offline
This approach is good.
Offline
This approach is good.
Thank you
Offline