summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@open.eurogiciel.org>2015-06-26 09:41:25 +0200
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>2015-06-26 12:29:44 +0200
commit16a54f52a16f6bd6779dbf4453e0e15a3910836a (patch)
tree53272b9b6bea340e38ebaab0188e7e2bccb0443e
parent882ca33360066d01c1236b0f974070952bdda3e4 (diff)
downloadwrt-widgets-tizen_3.0.2015.q2_common.tar.gz
wrt-widgets-tizen_3.0.2015.q2_common.tar.bz2
wrt-widgets-tizen_3.0.2015.q2_common.zip
- add initialisation of empty bases by issuing 'pkgcmd -l' - thus add developer in the loop - removes unused file Change-Id: I1c4de1264849570b7d69843bead2cc8cf8796a38 Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
-rw-r--r--install.conf1
-rwxr-xr-xinstall_widgets.sh46
-rw-r--r--packaging/wrt-widgets.spec2
-rwxr-xr-xprepare_widgets.sh22
-rw-r--r--xwalk_widgets_preinstall.service1
5 files changed, 25 insertions, 47 deletions
diff --git a/install.conf b/install.conf
index c52c7b8..7eae8b1 100644
--- a/install.conf
+++ b/install.conf
@@ -2,3 +2,4 @@ alice:annex.wgt
bob:bubblewrap.wgt go.wgt
carol:
guest:mancala.wgt
+developer:
diff --git a/install_widgets.sh b/install_widgets.sh
index 2390873..b5a1acb 100755
--- a/install_widgets.sh
+++ b/install_widgets.sh
@@ -11,31 +11,31 @@ function do_install() {
info "------------- wrt_widgets install start --------------"
local wgtdir=${TZ_SYS_SHARE}/widget_demo
- if [ -n "$(ls $wgtdir/*.wgt 2> /dev/null)" ]; then
- local nbinstall=0
- for wgt in $(grep "^$USER" $wgtdir/install.conf | cut -f2 -d':'); do
- info "installing $wgt"
- local try=1
- local ok=0
- while [ $try -le 3 ]; do
- flock -w 30 -e /tmp/pkgcmd_lock pkgcmd -i -q -t wgt -p $wgtdir/$wgt && { ok=1; break; }
- try=$((try+1))
- sleep 1
- done
- [ $ok -eq 1 ] && {
- info "$wgt installed successfully"
- nbinstall=$((nbinstall+1))
- } || info "failed to install $wgt"
+ local nbinstall=0
+ for wgt in $(grep "^$USER" $wgtdir/install.conf | cut -f2 -d':'); do
+ info "installing $wgt"
+ local try=1
+ local ok=0
+ while [ $try -le 3 ]; do
+ flock -w 30 -e /tmp/pkgcmd_lock pkgcmd -i -q -t wgt -p $wgtdir/$wgt && { ok=1; break; }
+ try=$((try+1))
+ sleep 1
done
-
- # signal tz-launcher that new apps were installed
- info "$nbinstall applications installed"
- if [ $nbinstall -gt 0 ]; then
- info "sending restart signal to tz-launcher"
- pkill -USR1 -U $UID tz-launcher
- fi
+ [ $ok -eq 1 ] && {
+ info "$wgt installed successfully"
+ nbinstall=$((nbinstall+1))
+ } || info "failed to install $wgt"
+ done
+
+ # signal tz-launcher that new apps were installed
+ info "$nbinstall applications installed"
+ if [ $nbinstall -gt 0 ]; then
+ info "sending restart signal to tz-launcher"
+ pkill -USR1 -U $UID tz-launcher
else
- info "$wgtdir doesn't contains any widgets (.wgt)"
+ info "$wgtdir hasn't installed widget (.wgt), init the bases..."
+ pkgcmd -l
+ info "init done"
fi
info "------------- wrt_widgets install end --------------"
diff --git a/packaging/wrt-widgets.spec b/packaging/wrt-widgets.spec
index addeb2f..5ff2673 100644
--- a/packaging/wrt-widgets.spec
+++ b/packaging/wrt-widgets.spec
@@ -25,7 +25,6 @@ cp %{SOURCE1001} .
mkdir -p %{buildroot}/%{_bindir}
cp install_widgets.sh %{buildroot}/%{_bindir}
-cp prepare_widgets.sh %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{TZ_SYS_SHARE}/widget_demo
cp -r apps/*.wgt %{buildroot}/%{TZ_SYS_SHARE}/widget_demo/
@@ -50,6 +49,5 @@ rm -f %{_unitdir_user}/default.target.wants/xwalk_widgets_preinstall.service
%defattr(-,root,root)
%{TZ_SYS_SHARE}/widget_demo/*
%attr(755,root,root) %{_bindir}/install_widgets.sh
-%attr(755,root,root) %{_bindir}/prepare_widgets.sh
%{_unitdir_user}/xwalk_widgets_preinstall.service
diff --git a/prepare_widgets.sh b/prepare_widgets.sh
deleted file mode 100755
index ac85903..0000000
--- a/prepare_widgets.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-##### vconf create table from settings package #########################
-# Set vconf values with -g/-u options
-
-source /etc/tizen-platform.conf
-
-rm -rf ${TZ_SYS_DATA}/setting/set_info
-
-#### Bluetotth API ####################################################
-vconftool set -t string db/menu_widget/regionformat "en_GB.UTF-8"
-vconftool set -t int db/menu_widget/regionformat_time1224 "1"
-vconftool set -t string db/setting/accessibility/font_name "HelveticaNeue"
-
-########################################################################
-# PC Specific Environment settings
-
-mkdir -p ${TZ_SYS_RW_PACKAGES}
-
-##### WA : To allow multi-user launch ##########
-chmod -R a+rw ${TZ_SYS_DB}/
-
diff --git a/xwalk_widgets_preinstall.service b/xwalk_widgets_preinstall.service
index 781432d..effe23e 100644
--- a/xwalk_widgets_preinstall.service
+++ b/xwalk_widgets_preinstall.service
@@ -5,6 +5,7 @@ ConditionPathExists=!%h/.applications/install_done
[Service]
Type=idle
ExecStart=/usr/bin/install_widgets.sh
+TimeoutSec=0
[Install]
WantedBy=default.target