Package: zeitgeist / 1.0.1-1

startup-database-vacuum.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Description: Use execute a VACUUM operation on activity DB on startups every 10 days
Author: Marco Trevisan <marco.trevisan@canonical.com>
Bug-Ubuntu: https://launchpad.net/bugs/919801
Forwarded: http://irclogs.ubuntu.com/2016/02/24/#ubuntu-desktop.html#t10:44

Index: b/data/org.gnome.zeitgeist.Engine.service.in
===================================================================
--- a/data/org.gnome.zeitgeist.Engine.service.in
+++ b/data/org.gnome.zeitgeist.Engine.service.in
@@ -1,4 +1,4 @@
 [D-BUS Service]
 Name=org.gnome.zeitgeist.Engine
-Exec=@bindir@/zeitgeist-daemon
+Exec=/bin/sh -c "@pkglibexecdir@/zeitgeist-maybe-vacuum; @bindir@/zeitgeist-daemon"
 SystemdService=zeitgeist.service
Index: b/data/zeitgeist.service.in
===================================================================
--- a/data/zeitgeist.service.in
+++ b/data/zeitgeist.service.in
@@ -4,4 +4,5 @@
 [Service]
 Type=dbus
 BusName=org.gnome.zeitgeist.Engine
+ExecStartPre=-@pkglibexecdir@/zeitgeist-maybe-vacuum
 ExecStart=@bindir@/zeitgeist-daemon
Index: b/data/Makefile.am
===================================================================
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -38,7 +38,7 @@
 	$(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
 %.service: %.service.in
-	$(AM_V_GEN)sed -e "s|@bindir[@]|$(bindir)|" $< > $@
+	$(AM_V_GEN)sed -e "s|@bindir[@]|$(bindir)|; s|@pkglibexecdir[@]|$(pkglibexecdir)|" $< > $@
 
 clean:
 	rm -rf *.pyc *.~[0-9]~