Create appfw dbs at first boot (workaround for TC-1624) 64/27664/1 accepted/tizen/common/20140917.103354 accepted/tizen/ivi/20140919.081430 submit/tizen_common/20140916.203010 submit/tizen_ivi/20140919.000001
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 17 Sep 2014 08:50:56 +0000 (10:50 +0200)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 17 Sep 2014 08:50:56 +0000 (10:50 +0200)
Change-Id: Ic94bb91288c5fd511e4389225bea3d06e0eafdea
Bug-Tizen: TC-1624
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
scripts/generic-desktop-applications.post

index f5365a8..d644ad0 100644 (file)
@@ -6,12 +6,19 @@ echo "#################### generic-desktop-applications.post ###################
 ail_initdb
 pkg_initdb
 
-echo "Fixing multiuser app_info dbs"
-chsmack -a "_" $TZ_SYS_DB/.app_info.db*
-chmod 764 $TZ_SYS_DB/.app_info.db*
-echo "Fixing multiuser pkgmgr-info dbs"
-chsmack -a "_" $TZ_SYS_DB/.pkgmgr*.db*
-chmod 764 $TZ_SYS_DB/.pkgmgr*.db*
+# workaround TC-1624 (ail-initdb/pkg_initdb segfault in MIC)
+cat >/usr/lib/systemd/system/appfw_initdb.service  <<'EOF'
+[Unit]
+Description=First boot script for init App DB (workaround TC-1624)
+ConditionPathExists=!/usr/dbspace/.app_info.db
+Before=ac.service
+
+[Service]
+ExecStart=/usr/bin/ail_initdb ; /usr/bin/pkg_initdb
+Type=oneshot
+RemainAfterExit=yes
+EOF
+ln -s appfw_initdb.service /usr/lib/systemd/system/graphical.target.wants/
 
 # depends on generic-base functions
 function generic_desktop_applications_fix_userhome() {