You are not logged in.
With the new version from upstream comes a new .conf file. What is the best way to force my PKGBUILD to move the old file to *.pacsave and force the new version to install?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Not recommended. The new conf should be installed as .pacnew, and you should use an install message to advise users to change their configuration to the new format.
Offline
Can do... I have been working on a readme.install to this end. One question about the pre_upgrade script. /usr/share/pacman/proto.install states:
## arg 1: the new package version
## arg 2: the old package version
#post_upgrade() {
# do something here
#}
I'm confused by the arg 1 and arg 2. Is it simply the version number with nothing else.
EDIT: ok.. I get it, Assign a variable to them to capture and check.
# $1: The new package version
# $2: The old package version
post_upgrade() {
NEW=`echo $1`
OLD=`echo $2`
if [ "$OLD" = "1.0.1" ]; then
do something
fi
Last edited by graysky (2010-02-11 22:01:03)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Let's say the old series of packages is 1.0.1-x where x is 1,2,3,4, and 5. How can I have the if then statement look to see if "$OLD" = "1.0.1-x"?
EDIT: Nevermind:
NEW=`echo $1 | cut -f-1 -d '-'`
OLD=`echo $2 | cut -f-1 -d '-'`
Last edited by graysky (2010-02-11 22:13:33)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Use vercmp instead. See the pkgtools install file for an example.
[git] | [AURpkgs] | [arch-games]
Offline
Use vercmp instead. See the pkgtools install file for an example.
http://repos.archlinux.org/wsvn/communi … ls.install
Thanks.
Last edited by graysky (2010-02-12 00:54:34)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline