static std::vector<std::string> updateTac;
static std::vector<std::string> updateTlc;
static tac_state tacState = TAC_STATE_NONE;
-static bool tacPluginInstalled = false;
-static bool tacPluginFinished = false;
+static std::string prevInstallPkgId = std::string("");
+static std::string prevFinishPkgId = std::string("");
static void createSHA256Info(std::string sha256Info, std::string nugetPackage)
{
_INFO("PackageID : %s", pkgId.c_str());
// Can be multiple apps in one package
- if (tacPluginInstalled) {
- _INFO("TAC plugin already installed");
+ if (strcmp(pkgId.c_str(), prevInstallPkgId.c_str()) == 0) {
+ _INFO("TAC Plugin(INSTALL) already run for same pkgId (%s)", pkgId.c_str());
return 0;
}
- tacPluginInstalled = true;
+ prevInstallPkgId = pkgId;
std::string appType = getAppType(pkgId);
if (strstr(appType.c_str(), "dotnet") == NULL) {
_INFO("PackageID : %s", pkgId.c_str());
// Can be multiple apps in one package
- if (tacPluginInstalled) {
- _INFO("TAC plugin already upgraded");
+ if (strcmp(pkgId.c_str(), prevInstallPkgId.c_str()) == 0) {
+ _INFO("TAC Plugin(UPGRADE) already run for same pkgId (%s)", pkgId.c_str());
return 0;
}
- tacPluginInstalled = true;
+ prevInstallPkgId = pkgId;
std::string appType = getAppType(pkgId);
if (strstr(appType.c_str(), "dotnet") == NULL) {
_INFO("PackageID : %s", pkgId.c_str());
// Can be multiple apps in one package
- if (tacPluginInstalled) {
- _INFO("TAC plugin already uninstalled");
+ if (strcmp(pkgId.c_str(), prevInstallPkgId.c_str()) == 0) {
+ _INFO("TAC Plugin(UNINSTALL) already run for same pkgId (%s)", pkgId.c_str());
return 0;
}
- tacPluginInstalled = true;
+ prevInstallPkgId = pkgId;
tacState= state;
if (tac_openDB() != 0) {
_INFO("PackageID : %s", pkgId.c_str());
// Can be multiple apps in one package
- if (tacPluginFinished) {
- _INFO("TAC plugin already finished(UNDO)");
+ if (strcmp(pkgId.c_str(), prevFinishPkgId.c_str()) == 0) {
+ _INFO("TAC Plugin(UNDO) already run for same pkgId (%s)", pkgId.c_str());
return 0;
}
- tacPluginFinished = true;
+ prevFinishPkgId = pkgId;
if (tacState == TAC_STATE_INSTALL) {
install_Undo();
_INFO("PackageID : %s", pkgId.c_str());
// Can be multiple apps in one package
- if (tacPluginFinished) {
- _INFO("TAC plugin already finished(CLEAN)");
+ if (strcmp(pkgId.c_str(), prevFinishPkgId.c_str()) == 0) {
+ _INFO("TAC Plugin(CLEAN) already run for same pkgId (%s)", pkgId.c_str());
return 0;
}
- tacPluginFinished = true;
+ prevFinishPkgId = pkgId;
if (tacState == TAC_STATE_INSTALL) {
install_Clean();