[arch-commits] Commit in dconf/trunk (4 files)
Jan Steffens
heftig at archlinux.org
Fri Apr 19 01:18:56 UTC 2019
Date: Friday, April 19, 2019 @ 01:18:56
Author: heftig
Revision: 350895
0.32.0-2: Add system database update hook
Added:
dconf/trunk/dconf-update.hook
dconf/trunk/dconf-update.script
dconf/trunk/dconf.install
Modified:
dconf/trunk/PKGBUILD
---------------------+
PKGBUILD | 14 ++++++++++----
dconf-update.hook | 12 ++++++++++++
dconf-update.script | 9 +++++++++
dconf.install | 11 +++++++++++
4 files changed, 42 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-04-19 00:43:37 UTC (rev 350894)
+++ PKGBUILD 2019-04-19 01:18:56 UTC (rev 350895)
@@ -3,7 +3,7 @@
pkgname=dconf
pkgver=0.32.0
-pkgrel=1
+pkgrel=2
pkgdesc="Configuration database system"
url="https://wiki.gnome.org/Projects/dconf"
arch=(x86_64)
@@ -10,9 +10,13 @@
license=(LGPL2.1)
depends=(glib2)
makedepends=(vala dbus git gtk-doc python meson bash-completion)
+install=dconf.install
_commit=7419a726a2dbaca7781cec4eeb65bd1334a523d7 # tags/0.32.0^0
-source=("git+https://gitlab.gnome.org/GNOME/dconf.git#commit=$_commit")
-sha256sums=('SKIP')
+source=("git+https://gitlab.gnome.org/GNOME/dconf.git#commit=$_commit"
+ dconf-update.{hook,script})
+sha256sums=('SKIP'
+ '51b5c5570eac4792eb4a0efe820e3451b2019501855e57974fcd18986cf86977'
+ '330142605370f82f4229e8a94b245f911407eb629b50f1497f415c70164a90ec')
pkgver() {
cd $pkgname
@@ -34,6 +38,8 @@
package() {
DESTDIR="$pkgdir" meson install -C build
+ install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 dconf-update.hook
+ install -D dconf-update.script "$pkgdir/usr/share/libalpm/scripts/dconf-update"
}
-# vim:set ts=2 sw=2 et:
+# vim:set sw=2 et:
Added: dconf-update.hook
===================================================================
--- dconf-update.hook (rev 0)
+++ dconf-update.hook 2019-04-19 01:18:56 UTC (rev 350895)
@@ -0,0 +1,12 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = etc/dconf/db/*.d/
+
+[Action]
+Description = Updating system dconf databases...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/dconf-update
+NeedsTargets
Added: dconf-update.script
===================================================================
--- dconf-update.script (rev 0)
+++ dconf-update.script 2019-04-19 01:18:56 UTC (rev 350895)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+while read -r d; do
+ if [[ ! -d $d ]]; then
+ rm -f "${d%.d/}"
+ fi
+done
+
+dconf update
Added: dconf.install
===================================================================
--- dconf.install (rev 0)
+++ dconf.install 2019-04-19 01:18:56 UTC (rev 350895)
@@ -0,0 +1,11 @@
+post_install() {
+ post_upgrade $1 0
+}
+
+post_upgrade() {
+ if (( $(vercmp $2 0.32.0-2) < 0 )); then
+ dconf update
+ fi
+}
+
+# vim:set sw=2 et:
More information about the arch-commits
mailing list