diff options
author | Stephane Desneux <stephane.desneux@open.eurogiciel.org> | 2014-06-02 16:24:29 -0700 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@open.eurogiciel.org> | 2014-06-02 16:24:29 -0700 |
commit | 7e77fb81639abc654b3d1740b5d01c609b18e286 (patch) | |
tree | 7e41b312fa947079151dfe87bb804d8259edc2d9 | |
parent | e7d6f5b0d64dc4f03ec1deffc37df97a1237d4c4 (diff) | |
download | meta-7e77fb81639abc654b3d1740b5d01c609b18e286.tar.gz meta-7e77fb81639abc654b3d1740b5d01c609b18e286.tar.bz2 meta-7e77fb81639abc654b3d1740b5d01c609b18e286.zip |
desktop-apps: fix per-user app databasessubmit/tizen_common/20140602.232521
Change-Id: If233df723824dfa6831df5dc645d3512015af50d
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-rw-r--r-- | scripts/common-desktop-applications.post | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/common-desktop-applications.post b/scripts/common-desktop-applications.post index 0368b71..98562c0 100644 --- a/scripts/common-desktop-applications.post +++ b/scripts/common-desktop-applications.post @@ -1,5 +1,31 @@ ############### common-desktop-applications.post ################ +# temp workaround to fill each user app_info database with global db infos +. /etc/tizen-platform.conf + +echo "Fixing multiuser app_info dbs" +chsmack -a "_" $TZ_SYS_DB/.app_info.db* +chmod 764 $TZ_SYS_DB/.app_info.db* + +for user in alice bob carol guest app; do + [ ! -d /home/$user ] && continue + echo "Fix app_info.db of $user" + chown -R $user:users /home/$user/.applications/dbspace/ + + if [ -f /home/$user/.applications/dbspace/.app_info.db ]; then + sqlite3 /home/$user/.applications/dbspace/.app_info.db <<EOF +attach database '$TZ_SYS_DB/.app_info.db' as common; +insert into app_info select * from common.app_info; +EOF + else + cp $TZ_SYS_DB/.app_info.db /home/$user/.applications/dbspace/.app_info.db + fi + + chown -R $user:users /home/$user/.applications/dbspace/ + chsmack -a User /home/$user/.applications/dbspace/.app_info.db* +done + + if [ -f /usr/bin/weston ]; then cat >>/etc/xdg/weston/weston.ini <<EOF |