projects
/
platform
/
core
/
dotnet
/
launcher.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support Multi-Package Install Scenario
[platform/core/dotnet/launcher.git]
/
NativeLauncher
/
installer-plugin
/
dotnet_apptype_plugin.cc
diff --git
a/NativeLauncher/installer-plugin/dotnet_apptype_plugin.cc
b/NativeLauncher/installer-plugin/dotnet_apptype_plugin.cc
index
0cff386
..
973a806
100644
(file)
--- a/
NativeLauncher/installer-plugin/dotnet_apptype_plugin.cc
+++ b/
NativeLauncher/installer-plugin/dotnet_apptype_plugin.cc
@@
-30,16
+30,20
@@
typedef struct _xmlDoc xmlDoc;
typedef xmlDoc* xmlDocPtr;
typedef struct _xmlDoc xmlDoc;
typedef xmlDoc* xmlDocPtr;
-static
bool pluginInstalled = false
;
+static
std::string prevInstallPkgId = std::string("")
;
extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId)
{
extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId)
{
+ if (pkgId == NULL) {
+ return 0;
+ }
+
// Can be multiple apps in one package
// Can be multiple apps in one package
- if (
pluginInstalled
) {
- _INFO("
Plugin already installed"
);
+ if (
strcmp(pkgId, prevInstallPkgId.c_str()) == 0
) {
+ _INFO("
AppType Plugin already run for same pkgId (%s)", pkgId
);
return 0;
}
return 0;
}
- p
luginInstalled = true
;
+ p
revInstallPkgId = pkgId
;
std::string appType = getAppType(pkgId);
if (appType.empty()) {
std::string appType = getAppType(pkgId);
if (appType.empty()) {