summaryrefslogtreecommitdiffstats
path: root/abs/core/pacman/pacman.install
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2011-08-04 17:36:08 (GMT)
committerJames Meyer <james.meyer@operamail.com>2011-08-04 17:36:08 (GMT)
commit7681a52889415179b104adb0aebac6f9742faa84 (patch)
treef7eb976e4bb4eeee730cea41ecd6a3f61ac89623 /abs/core/pacman/pacman.install
parent24dae363a3bc25af8d072b2215eecb11777da049 (diff)
downloadlinhes_pkgbuild-7681a52889415179b104adb0aebac6f9742faa84.zip
linhes_pkgbuild-7681a52889415179b104adb0aebac6f9742faa84.tar.gz
linhes_pkgbuild-7681a52889415179b104adb0aebac6f9742faa84.tar.bz2
pacman: Add SyncFirst to pacman.conf on upgrade, remove larch from pacman.conf on upgrade
Diffstat (limited to 'abs/core/pacman/pacman.install')
-rw-r--r--abs/core/pacman/pacman.install16
1 files changed, 16 insertions, 0 deletions
diff --git a/abs/core/pacman/pacman.install b/abs/core/pacman/pacman.install
index a3066bc..c066733 100644
--- a/abs/core/pacman/pacman.install
+++ b/abs/core/pacman/pacman.install
@@ -9,6 +9,7 @@ post_upgrade() {
if [ "$(vercmp $2 3.5.0)" -lt 0 ]; then
_warnupgrade
fi
+ _updateconf
echo ">>>"
echo ">>> ATTENTION! ATTENTION! ATTENTION!"
echo ">>> /etc/pacman.conf has changed. If you have customized your"
@@ -18,6 +19,21 @@ post_upgrade() {
echo ">>>"
}
+_updateconf() {
+ pacconf="/etc/pacman.conf"
+ #add SyncFirst
+ grep -q SyncFirst $pacconf
+ if [ $? -eq 1 ]
+ then
+ sed -i '/\[options\]/ a\SyncFirst = pacman ' $pacconf
+ fi
+ #remove larch
+ sed -i '/larch/d' $pacconf
+
+}
+
+
+
_warnupgrade() {
echo ">>>"
echo ">>> The pacman database format has changed as of pacman 3.5.0."