Widget gets corrupted if device battery is removed while uninstalling it.
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 4 Oct 2013 15:25:25 +0000 (17:25 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 22 Oct 2013 04:55:13 +0000 (04:55 +0000)
commita7f97820bd97175a1f54f336c9c8337158ce7fa1
treef68854afe8faf6e559b935f123ca34847b1d2524
parentaf8ac24f7ac6d6ecef023da2503cafbbc854d18a
Widget gets corrupted if device battery is removed while uninstalling it.

 *** This patch is just a temporary fix. See [Remarks] section. ***

[Issue#]   WGL-580
[Problem]  Uninstallation is broken if battery is removed when uninstalling.
[Cause]    Db is cleaned up but files are still present.
[Solution] Ignore existing files for new installation.

[Remarks]
 If widget was uninstalled (no db information).
 Source of problem is that installation/uninstalaltion is not fully transactional
 and there is no information that something is to be fixed.
 This is just a temporary fix. This is currently losing disc space
 for widgets that will not be installed again.

Separate solution (daemon/boot time/...) for fixing unfinshed jobs should be proposed.

[Verification] Build repo and (as in issue):
 1) Install a heavy widget.
 2) Uninstall the same the widget.
 3) While uninstalling the widget, remove battery.
 4) Again install the same widget.( on step 3, widget is un-installed)

* Use widget attached in https://bugs.tizendev.org/jira/browse/WGL-580

Change-Id: I3e840cc5c508fe9951c77cabfceb377fb996a927
src/jobs/widget_install/task_configuration.cpp