void* wrtInstaller;
std::string pluginPath;
};
-
-bool checkInitializeToPreload(std::string pkgid)
-{
- std::string RoManifest = "/usr/share/packages/" + pkgid + ".xml";
- std::string RwManifest = "/opt/share/packages/" + pkgid + ".xml";
-
- if (access(RwManifest.c_str(), F_OK) == 0 &&
- access(RoManifest.c_str(), F_OK) == 0) {
- LogDebug("This web app need to down update");
- return true;
- }
- return false;
-}
} // namespace anonymous
WrtInstaller::WrtInstaller(int argc, char **argv) :
{
LogDebug("Uninstalling widget ...");
LogDebug("Package name : " << m_name);
+ pkgmgr_pkginfo_h handle;
+ int ret = -1;
+ bool preload = false;
+
+ if (0 == pkgmgr_pkginfo_get_pkginfo(m_name.c_str(), &handle)) {
+ if (pkgmgr_pkginfo_is_preload(handle, &preload) < 0) {
+ LogError("Can't get package information : " << m_name);
+ }
+ }
- if (!checkInitializeToPreload(m_name)) {
+ if (preload) {
+ LogDebug("This web app need to initialize preload app");
wrt_uninstall_widget(m_name.c_str(), this,
- &staticWrtStatusCallback,
+ &staticWrtInitializeToPreloadCallback,
(m_installByPkgmgr)
? &staticWrtUninstallProgressCallback : NULL,
pkgmgrSignalInterface);
} else {
wrt_uninstall_widget(m_name.c_str(), this,
- &staticWrtInitializeToPreloadCallback,
+ &staticWrtStatusCallback,
(m_installByPkgmgr)
? &staticWrtUninstallProgressCallback : NULL,
pkgmgrSignalInterface);