return true;
}
+bool
+InstallerUtil::DumpLog(const char* pBuf)
+{
+ char temp[4096] = {0};
+ TryReturn(pBuf, false, "[osp-installer] pBuf is null");
+
+ int bufLen = strlen(pBuf);
+ strncpy(temp, pBuf, sizeof(temp));
+
+ char *pStart = &temp[0];
+
+ for (int i = 0; i < bufLen; i++)
+ {
+ if (temp[i] == '\n')
+ {
+ temp[i] = 0;
+ AppLogTag(OSP_INSTALLER, "%s", pStart);
+ pStart = temp + i + 1;
+ }
+ }
+
+ return true;
+}
#include "InstallerDefs.h"
#include "XmlWriter.h"
+#include "InstallerUtil.h"
using namespace Osp::Base;
using namespace Osp::Base::Collection;
AppLogTag(OSP_INSTALLER, "------------------------------------------");
AppLogTag(OSP_INSTALLER, "%ls is generated", __xmlFilePath.GetPointer());
AppLogTag(OSP_INSTALLER, "------------------------------------------");
- AppLogTag(OSP_INSTALLER, "%s", __pXmlBuffer->content);
+ // AppLogTag(OSP_INSTALLER, "%s", __pXmlBuffer->content);
+ InstallerUtil::DumpLog((const char*)__pXmlBuffer->content);
}
if (__pXmlWriter)
case PKGMGR_REQ_INSTALL:
{
errorType = manager.Request(path, INSTALLER_OPERATION_INSTALL, REQUESTER_TYPE_NORMAL);
-
+ appId = manager.GetAppId();
if (_pi != 0)
{
char resultBuf[128] = {0};
AppLogTag(OSP_INSTALLER, "requestAppId = %ls", requestAppId.GetPointer());
ret = manager.Request(requestAppId, INSTALLER_OPERATION_UNINSTALL, REQUESTER_TYPE_NORMAL);
+ appId = manager.GetAppId();
if (_pi != 0)
{
}
else
{
- manager.PrintResult();
snprintf(resultBuf, sizeof(resultBuf), "%ls", appId.GetPointer());
}
ret = pkgmgr_installer_send_signal(_pi, pPkgType, resultBuf, pKey, pValue);
AppLogTag(OSP_INSTALLER, "------------------------------------------");
AppLogTag(OSP_INSTALLER, "pkgmgr_installer_send_signal");
- AppLogTag(OSP_INSTALLER, " # type = [%s]", pPkgType);
- AppLogTag(OSP_INSTALLER, " # key = [%s]", pKey);
- AppLogTag(OSP_INSTALLER, " # val = [%s]", pValue);
- AppLogTag(OSP_INSTALLER, " # ret = [%s]", (ret == 0)?"success":"failure");
+ AppLogTag(OSP_INSTALLER, " # type = [%s]", pPkgType);
+ AppLogTag(OSP_INSTALLER, " # pkg id = [%s]", resultBuf);
+ AppLogTag(OSP_INSTALLER, " # key = [%s]", pKey);
+ AppLogTag(OSP_INSTALLER, " # val = [%s]", pValue);
+ AppLogTag(OSP_INSTALLER, " # ret = [%s]", (ret == 0)?"success":"failure");
AppLogTag(OSP_INSTALLER, "------------------------------------------");
pkgmgr_installer_free(_pi);