if (!m_value.IsNull() && *m_value == ignoreUri)
{
- LogInfo("exception : '" << *m_value << "' scheme will be ignored.");
+ LogDebug("exception : '" << *m_value << "' scheme will be ignored.");
m_value = DPL::OptionalString::Null;
}
m_version = attribute.value;
NormalizeString(m_version);
} else if (attribute.name == L"min-version") {
- LogInfo("min-version attribute was found. Value: " << attribute.value);
+ LogDebug("min-version attribute was found. Value: " << attribute.value);
m_minVersion = attribute.value;
NormalizeString(m_minVersion);
m_data.minVersionRequired = m_minVersion;
//Any other value consider as a namespace definition
} else if (attribute.name == L"xmlns" || attribute.prefix == L"xmlns") {
- LogInfo("Namespace domain: " << attribute.name);
- LogInfo("Namespace value: " << attribute.value);
+ LogDebug("Namespace domain: " << attribute.name);
+ LogDebug("Namespace value: " << attribute.value);
m_nameSpaces[attribute.name] = attribute.value;
} else {
LogError("Unknown attirbute: namespace=" << attribute.ns <<
getInstallerStruct().finishedCallback(getInstallerStruct().userParam,
Jobs::Exceptions::ErrorPluginInstallationFailed);
- LogInfo("Installation: " << getFilePath() <<
+ LogDebug("Installation: " << getFilePath() <<
" NOT possible");
}
}
void PluginInstallTask::stepCheckPluginPath()
{
- LogInfo("Plugin installation: step CheckPluginPath");
+ LogDebug("Plugin installation: step CheckPluginPath");
if(!m_context->pluginFilePath.Exists()){
ThrowMsg(Exceptions::PluginPathFailed,
void PluginInstallTask::stepParseConfigFile()
{
- LogInfo("Plugin installation: step parse config file");
+ LogDebug("Plugin installation: step parse config file");
DPL::Utils::Path filename = m_context->pluginFilePath;
filename /= GlobalConfig::GetPluginMetafileName();
return;
}
- LogInfo("Plugin Config file::" << filename.Filename());
+ LogDebug("Plugin Config file::" << filename.Filename());
Try
{
void PluginInstallTask::stepLoadPluginLibrary()
{
- LogInfo("Plugin installation: step load library");
+ LogDebug("Plugin installation: step load library");
DISABLE_IF_PLUGIN_WITHOUT_LIB()
m_libraryObjects = PluginObjectsPtr(new PluginObjects());
const js_entity_definition_t *rawEntityListIterator = rawEntityList;
- LogInfo("#####");
- LogInfo("##### Plugin: " << filename.Filename() << " supports new plugin API");
- LogInfo("#####");
+ LogDebug("#####");
+ LogDebug("##### Plugin: " << filename.Filename() << " supports new plugin API");
+ LogDebug("#####");
while (rawEntityListIterator->parent_name != NULL &&
rawEntityListIterator->object_name != NULL)
{
- LogInfo("##### [" << rawEntityListIterator->object_name << "]: ");
- LogInfo("##### Parent: " << rawEntityListIterator->parent_name);
- LogInfo("#####");
+ LogDebug("##### [" << rawEntityListIterator->object_name << "]: ");
+ LogDebug("##### Parent: " << rawEntityListIterator->parent_name);
+ LogDebug("#####");
m_libraryObjects->addObjects(rawEntityListIterator->parent_name,
rawEntityListIterator->object_name);
void PluginInstallTask::stepRegisterPlugin()
{
- LogInfo("Plugin installation: step register Plugin");
+ LogDebug("Plugin installation: step register Plugin");
m_pluginHandle =
PluginDAO::registerPlugin(m_pluginInfo, m_context->pluginFilePath.Fullpath());
void PluginInstallTask::stepRegisterFeatures()
{
- LogInfo("Plugin installation: step register features");
+ LogDebug("Plugin installation: step register features");
FOREACH(it, m_pluginInfo.m_featureContainer)
{
void PluginInstallTask::stepRegisterPluginObjects()
{
- LogInfo("Plugin installation: step register objects");
+ LogDebug("Plugin installation: step register objects");
DISABLE_IF_PLUGIN_WITHOUT_LIB()
void PluginInstallTask::stepResolvePluginDependencies()
{
- LogInfo("Plugin installation: step resolve dependencies ");
+ LogDebug("Plugin installation: step resolve dependencies ");
//DISABLE_IF_PLUGIN_WITHOUT_LIB
if (m_pluginInfo.m_libraryName.empty()) {
ConfigureResult result = prepareInstallation(widgetPath);
if (result == ConfigureResult::Ok) {
- LogInfo("Configure installation succeeded");
+ LogDebug("Configure installation succeeded");
m_installerContext.job->SetProgressFlag(true);
AddTask(new TaskRecovery(m_installerContext));
AddTask(new TaskAceCheck(m_installerContext));
AddTask(new TaskSmack(m_installerContext));
} else if (result == ConfigureResult::Updated) {
- LogInfo("Configure installation updated");
- LogInfo("Widget Update");
+ LogDebug("Configure installation updated");
+ LogDebug("Widget Update");
m_installerContext.job->SetProgressFlag(true);
if (m_installerContext.mode.command ==
break;
}
m_installerContext.widgetConfig.tzPkgid = pkgId;
- LogInfo("tizen_id name was generated by WRT: " <<
+ LogDebug("tizen_id name was generated by WRT: " <<
m_installerContext.widgetConfig.tzPkgid);
}
m_installerContext.
widgetConfig.
tzPkgid));
- LogInfo("Tizen App Id : " << m_installerContext.widgetConfig.tzAppid);
- LogInfo("Tizen Pkg Id : " << m_installerContext.widgetConfig.tzPkgid);
- LogInfo("W3C Widget GUID : " << m_installerContext.widgetConfig.guid);
+ LogDebug("Tizen App Id : " << m_installerContext.widgetConfig.tzAppid);
+ LogDebug("Tizen Pkg Id : " << m_installerContext.widgetConfig.tzPkgid);
+ LogDebug("W3C Widget GUID : " << m_installerContext.widgetConfig.guid);
}
void JobWidgetInstall::configureWidgetLocation(const std::string & widgetPath,
m_installerContext.locations->registerAppid(
DPL::ToUTF8String(m_installerContext.widgetConfig.tzAppid));
- LogInfo("widgetSource " << widgetPath);
+ LogDebug("widgetSource " << widgetPath);
}
ConfigureResult JobWidgetInstall::ConfigureInstallation(
bool JobWidgetInstall::validateTizenApplicationID(
const WrtDB::TizenAppId &tizenAppId)
{
- LogInfo("tizen application ID = [" << tizenAppId << "]");
+ LogDebug("tizen application ID = [" << tizenAppId << "]");
regex_t reg;
if (regcomp(®, REG_TIZENID_PATTERN, REG_NOSUB | REG_EXTENDED) != 0) {
return ConfigureResult::Failed;
}
- LogInfo("existing version = '" << update.existingVersion);
- LogInfo("incoming version = '" << update.incomingVersion);
- LogInfo("Tizen AppID = " << update.tzAppId);
+ LogDebug("existing version = '" << update.existingVersion);
+ LogDebug("incoming version = '" << update.incomingVersion);
+ LogDebug("Tizen AppID = " << update.tzAppId);
// Check running state
bool isRunning = false;
LogError("Fail to terminate running application");
return ConfigureResult::Failed_WidgetRunning;
}
- LogInfo("terminate application");
+ LogDebug("terminate application");
}
}
const ConfigParserData &configInfo,
const WrtDB::TizenAppId &tizenId)
{
- LogInfo("Checking up widget package for config.xml...");
+ LogDebug("Checking up widget package for config.xml...");
OptionalWidgetVersion incomingVersion;
if (!configInfo.version.IsNull()) {
out << std::endl;
- LogInfo(out.str());
+ LogDebug(out.str());
}
WrtDB::PackagingType JobWidgetInstall::checkPackageType(
const std::string &tempPath)
{
if (hasExtension(widgetSource, XML_EXTENSION)) {
- LogInfo("Hosted app installation");
+ LogDebug("Hosted app installation");
return PKG_TYPE_HOSTED_WEB_APP;
}
{
AppType widgetAppType = APP_TYPE_UNKNOWN;
FOREACH(iterator, configInfo.nameSpaces) {
- LogInfo("namespace = [" << *iterator << "]");
+ LogDebug("namespace = [" << *iterator << "]");
if (*iterator == ConfigurationNamespace::TizenWebAppNamespaceName) {
if (widgetAppType != APP_TYPE_UNKNOWN &&
m_installerContext.widgetConfig.webAppType = widgetAppType;
- LogInfo("type = [" <<
+ LogDebug("type = [" <<
m_installerContext.widgetConfig.webAppType.getApptypeToString() <<
"]");
}
void TaskAceCheck::StepAceCheck()
{
WrtDB::WidgetDAO dao(m_context.widgetConfig.tzAppid);
- LogInfo("StepAceCheck!");
+ LogDebug("StepAceCheck!");
// This widget does not use any device cap
if (m_context.featureLogic->isDone()) {
return;
}
- LogInfo("StepAceCheck!");
+ LogDebug("StepAceCheck!");
DPL::String deviceCap = m_context.featureLogic->getDevice();
- LogInfo("StepAceCheck!");
- LogInfo("DevCap is : " << deviceCap);
+ LogDebug("StepAceCheck!");
+ LogDebug("DevCap is : " << deviceCap);
std::string devCapStr = DPL::ToUTF8String(deviceCap);
ace_policy_result_t policyResult = ACE_DENY;
}
}
- LogInfo("PolicyResult is : " << static_cast<int>(policyResult));
+ LogDebug("PolicyResult is : " << static_cast<int>(policyResult));
m_context.staticPermittedDevCaps.insert(std::make_pair(deviceCap,
policyResult ==
ACE_PERMIT));
return;
}
- LogInfo("StepProcessAceResponse");
+ LogDebug("StepProcessAceResponse");
m_context.featureLogic->next();
// No device caps left to process
if (m_context.featureLogic->isDone()) {
- LogInfo("All responses has been received from ACE.");
+ LogDebug("All responses has been received from ACE.");
// Data to convert to C API
std::vector<std::string> devCaps;
std::vector<bool> devCapsSmack;
// Saving static dev cap permissions
FOREACH(cap, m_context.staticPermittedDevCaps) {
- LogInfo("staticPermittedDevCaps : " << cap->first
+ LogDebug("staticPermittedDevCaps : " << cap->first
<< " smack: " << cap->second);
std::string devCapStr = DPL::ToUTF8String(cap->first);
devCaps.push_back(devCapStr);
return;
}
- LogInfo("Next device cap.");
+ LogDebug("Next device cap.");
// Process next device cap
SwitchToStep(&TaskAceCheck::StepAceCheck);
}
void TaskAceCheck::StepCheckAceResponse()
{
- LogInfo("Checking ACE response");
+ LogDebug("Checking ACE response");
if (m_context.featureLogic->isRejected()) {
LogError("Installation failure. Some devCap was not accepted by ACE.");
ThrowMsg(
"Instalation failure. "
"Some deviceCap was not accepted by ACE.");
}
- LogInfo("Updating \"feature reject status\" in database!");
+ LogDebug("Updating \"feature reject status\" in database!");
auto it = m_context.featureLogic->resultBegin();
auto end = m_context.featureLogic->resultEnd();
for (; it != end; ++it) {
- LogInfo(
+ LogDebug(
" |- Feature: " << it->name << " has reject status: " <<
it->rejected);
if (it->rejected) {
dao.updateFeatureRejectStatus(*it);
}
}
- LogInfo("Installation continues...");
+ LogDebug("Installation continues...");
m_context.job->UpdateProgress(
InstallerContext::INSTALL_ACE_CHECK,
void TaskCertify::processAuthorSignature(const SignatureData &data)
{
using namespace ValidationCore;
- LogInfo("DNS Identity match!");
+ LogDebug("DNS Identity match!");
// this signature is verified or widget is distributor signed
m_contextData.widgetSecurity.setAuthorCertificatePtr(data.getEndEntityCertificatePtr());
CertificatePtr test = m_contextData.widgetSecurity.getAuthorCertificatePtr();
void TaskCertify::stepSignature()
{
- LogInfo("================ Step: <<Signature>> ENTER ===============");
+ LogDebug("================ Step: <<Signature>> ENTER ===============");
std::string widgetPath;
widgetPath = m_contextData.locations->getTemporaryPackageDir() + "/";
}
SignatureFileInfoSet::reverse_iterator iter = signatureFiles.rbegin();
- LogInfo("Number of signatures: " << signatureFiles.size());
+ LogDebug("Number of signatures: " << signatureFiles.size());
for (; iter != signatureFiles.rend(); ++iter) {
- LogInfo("Checking signature with id=" << iter->getFileNumber());
+ LogDebug("Checking signature with id=" << iter->getFileNumber());
SignatureData data(widgetPath + iter->getFileName(),
iter->getFileNumber());
}
if (signatureFiles.empty()) {
- LogInfo("No signature files has been found.");
+ LogDebug("No signature files has been found.");
}
- LogInfo("================ Step: <<Signature>> DONE ================");
+ LogDebug("================ Step: <<Signature>> DONE ================");
m_contextData.job->UpdateProgress(
InstallerContext::INSTALL_DIGSIG_CHECK,
void TaskCertify::stepFinalize()
{
- LogInfo("Step: <<CERTYFYING DONE>>");
+ LogDebug("Step: <<CERTYFYING DONE>>");
m_contextData.job->UpdateProgress(
InstallerContext::INSTALL_CERT_CHECK,
void TaskCertify::stepVerifyUpdate()
{
- LogInfo("Step: <<Check Update>>");
+ LogDebug("Step: <<Check Update>>");
CertificatePtr newCertificate =
m_contextData.widgetSecurity.getAuthorCertificatePtr();
CertificatePtr oldCertificate =
std::string createTempPath(bool preload)
{
- LogInfo("Step: Creating temporary path");
+ LogDebug("Step: Creating temporary path");
// Temporary path
std::ostringstream tempPathBuilder;
time(&m_context.widgetConfig.installedTime);
if (m_context.isUpdateMode) { //update
- LogInfo("Registering widget... (update)");
+ LogDebug("Registering widget... (update)");
Try
{
m_handleToRemove = WidgetDAOReadOnly::getHandle(
m_handle = WidgetDAOReadOnly::getHandle(
m_context.widgetConfig.tzAppid);
} else { //new installation
- LogInfo("Registering widget...");
+ LogDebug("Registering widget...");
WidgetDAO::registerWidget(
m_context.widgetConfig.tzAppid,
m_context.widgetConfig,
}
FOREACH(cap, m_context.staticPermittedDevCaps) {
- LogInfo(
+ LogDebug(
"staticPermittedDevCaps : " << cap->first
<< " smack status: " <<
cap->second);
}
- LogInfo("Widget registered");
+ LogDebug("Widget registered");
}
Catch(WidgetDAO::Exception::DatabaseError)
{
} else {
boxType = DPL::ToUTF8String((**it).m_type);
}
- LogInfo("livebox id: " << boxId);
- LogInfo("livebox type: " << boxType);
+ LogDebug("livebox id: " << boxId);
+ LogDebug("livebox type: " << boxType);
int autoLaunch = (**it).m_autoLaunch == L"true" ? 1 : 0;
- LogInfo("livebox auto-launch: " << autoLaunch);
+ LogDebug("livebox auto-launch: " << autoLaunch);
int mouseEvent = (**it).m_boxInfo.m_boxMouseEvent == L"true" ? 1 : 0;
- LogInfo("livebox mouse-event: " << mouseEvent);
+ LogDebug("livebox mouse-event: " << mouseEvent);
int pdFastOpen = (**it).m_boxInfo.m_pdFastOpen == L"true" ? 1 : 0;
- LogInfo("livebox pd fast-open: " << pdFastOpen);
+ LogDebug("livebox pd fast-open: " << pdFastOpen);
web_provider_livebox_insert_box_info(
boxId.c_str(), tizenId.c_str(), boxType.c_str(),
"Chown to invaild user");
}
} else if (euidaccess(storagePath.c_str(), W_OK | R_OK | X_OK) == 0) {
- LogInfo(storagePath << " already exists.");
+ LogDebug(storagePath << " already exists.");
// Even if private directory already is created, private dircetory
// should change owner.
if (chown(storagePath.c_str(),
void TaskInstallOspsvc::StepInstallOspService()
{
- LogInfo("Step: installation for osp service");
+ LogDebug("Step: installation for osp service");
std::ostringstream commStr;
commStr << OSP_INSTALL_STR << BashUtils::escape_arg(
}
#else
//default widget
- LogInfo("link -s " << clientExeStr << " " << exec);
+ LogDebug("link -s " << clientExeStr << " " << exec);
errno = 0;
if (symlink(clientExeStr.c_str(), exec.c_str()) != 0)
{
void TaskManifestFile::backupIconFiles()
{
- LogInfo("Backup Icon Files");
+ LogDebug("Backup Icon Files");
std::ostringstream b_icon_dir;
b_icon_dir << backup_dir.str() << "icons";
if (!(m_context.mode.rootPath == InstallMode::RootPath::RO &&
m_context.mode.installTime == InstallMode::InstallTime::PRELOAD
&& m_context.mode.extension == InstallMode::ExtensionType::DIR)) {
- LogInfo("cp " << manifest_file << " " << commit_manifest);
+ LogDebug("cp " << manifest_file << " " << commit_manifest);
DPL::FileInput input(DPL::ToUTF8String(manifest_file));
DPL::FileOutput output(commit_manifest);
m_context.widgetConfig.configInfo.appControlList;
if (appControlList.empty()) {
- LogInfo("Widget doesn't contain app control");
+ LogDebug("Widget doesn't contain app control");
return;
}
m_context.widgetConfig.configInfo.categoryList;
if (categoryList.empty()) {
- LogInfo("Widget doesn't contain application category");
+ LogDebug("Widget doesn't contain application category");
return;
}
FOREACH(it, categoryList) {
m_context.widgetConfig.configInfo.metadataList;
if (metadataList.empty()) {
- LogInfo("Web application doesn't contain metadata");
+ LogDebug("Web application doesn't contain metadata");
return;
}
FOREACH(it, metadataList) {
void TaskManifestFile::setLiveBoxInfo(Manifest& manifest)
{
FOREACH(it, m_context.widgetConfig.configInfo.m_livebox) {
- LogInfo("setLiveBoxInfo");
+ LogDebug("setLiveBoxInfo");
LiveBoxInfo liveBox;
DPL::Optional<WrtDB::ConfigParserData::LiveboxInfo> ConfigInfo = *it;
DPL::String appid = m_context.widgetConfig.tzAppid;
if (ConfigInfo->m_boxInfo.m_boxSrc.empty() ||
ConfigInfo->m_boxInfo.m_boxSize.empty())
{
- LogInfo("Widget doesn't contain box");
+ LogDebug("Widget doesn't contain box");
return;
} else {
BoxInfoType box;
AccountProviderType provider;
if (account.m_iconSet.empty()) {
- LogInfo("Widget doesn't contain Account");
+ LogDebug("Widget doesn't contain Account");
return;
}
if (account.m_multiAccountSupport) {
void TaskPrepareReinstall::StepPrepare()
{
- LogInfo("Prepare");
+ LogDebug("Prepare");
m_sourcePath = m_context.locations->getTemporaryPackageDir();
m_sourcePath += "/";
void TaskPrepareReinstall::StepParseRDSDelta()
{
- LogInfo("parse RDS delta");
+ LogDebug("parse RDS delta");
std::string rdsDeltaPath = m_sourcePath;
rdsDeltaPath += ".rds_delta";
std::ifstream delta(rdsDeltaPath);
while (std::getline(delta, line) &&!delta.eof()) {
FOREACH(keyIt, keyList) {
if (line == *keyIt) {
- LogInfo("find key = [" << line << "]");
+ LogDebug("find key = [" << line << "]");
key = line;
break;
}
}
if (key == KEY_DELETE) {
m_deleteFileList.push_back(line);
- LogInfo("line = [" << line << "]");
+ LogDebug("line = [" << line << "]");
} else if (key == KEY_ADD) {
m_addFileList.push_back(line);
- LogInfo("line = [" << line << "]");
+ LogDebug("line = [" << line << "]");
} else if (key == KEY_MODIFY) {
m_modifyFileList.push_back(line);
- LogInfo("line = [" << line << "]");
+ LogDebug("line = [" << line << "]");
}
}
}
void TaskPrepareReinstall::StepVerifyRDSDelta()
{
- LogInfo("verify RDS delta");
+ LogDebug("verify RDS delta");
// Verify ADD file
FOREACH(file, m_addFileList) {
std::string addFilePath = m_sourcePath;
existingFilePath += *file;
verifyFile(existingFilePath);
}
- LogInfo("Finished veify RDS Delta");
+ LogDebug("Finished veify RDS Delta");
m_context.job->UpdateProgress(
InstallerContext::INSTALL_RDS_DELTA_CHECK,
void TaskPrepareReinstall::StepAddFile()
{
- LogInfo("Add file");
+ LogDebug("Add file");
FOREACH(file, m_addFileList) {
std::string newfile = m_sourcePath;
newfile += *file;
ThrowMsg(Exceptions::RDSDeltaFailure,
"Fail to ADD file " << newfile);
}
- LogInfo("Copy " << newfile << " to " << destPath);
+ LogDebug("Copy " << newfile << " to " << destPath);
}
}
void TaskPrepareReinstall::StepDeleteFile()
{
- LogInfo("Delete file");
+ LogDebug("Delete file");
FOREACH(file, m_deleteFileList) {
std::string deleteFilePath = m_installedPath;
deleteFilePath += *file;
ThrowMsg(Exceptions::RDSDeltaFailure,
"Fail to DELETE file " << deleteFilePath);
}
- LogInfo("Delete " << deleteFilePath);
+ LogDebug("Delete " << deleteFilePath);
}
}
void TaskPrepareReinstall::StepModifyFile()
{
- LogInfo("Modify file");
+ LogDebug("Modify file");
FOREACH(file, m_modifyFileList) {
std::string destPath = m_installedPath;
destPath += *file;
ThrowMsg(Exceptions::RDSDeltaFailure,
"Fail to move new file" << destPath);
}
- LogInfo("Replace " << newfile << " to " << destPath);
+ LogDebug("Replace " << newfile << " to " << destPath);
}
m_context.job->UpdateProgress(
InstallerContext::INSTALL_RDS_PREPARE,
void TaskRecovery::StepCreateCheckFile()
{
- LogInfo("Step: create information file for recovery");
+ LogDebug("Step: create information file for recovery");
size_t pos = m_context.locations->getWidgetSource().rfind("/");
std::ostringstream infoPath;
void TaskSmack::StepSetInstall()
{
- LogInfo("----------------> SMACK: StepStartSetSmack()");
+ LogDebug("----------------> SMACK: StepStartSetSmack()");
#ifdef WRT_SMACK_ENABLED
std::string pkg = DPL::ToUTF8String(m_context.widgetConfig.tzPkgid);
m_pkgId = (char*)calloc(1, pkg.length() + 1);
void TaskSmack::StepSmackFolderLabeling()
{
- LogInfo("----------------> SMACK:\
+ LogDebug("----------------> SMACK:\
Jobs::WidgetInstall::TaskSmack::SmackFolderLabelingStep()");
#ifdef WRT_SMACK_ENABLED
/* /opt/usr/apps/[pkgid] directory's label is "_" */
void TaskSmack::StepSmackPrivilege()
{
- LogInfo("----------------> SMACK:\
+ LogDebug("----------------> SMACK:\
Jobs::WidgetInstall::TaskSmack::SmackPrivilegeStep()");
#ifdef WRT_SMACK_ENABLED
/* TODO :
char** perm_list = new char*[privileges.size() + 1];
int index = 0;
FOREACH(it, privileges) {
- LogInfo("Permission : " << it->name);
+ LogDebug("Permission : " << it->name);
int length = DPL::ToUTF8String(it->name).length();
char *priv = new char[length + 1];
snprintf(priv, length + 1, "%s",
void TaskSmack::StepRevokeForUpdate()
{
- LogInfo("----------------> SMACK:\
+ LogDebug("----------------> SMACK:\
Jobs::WidgetInstall::TaskSmack::StepRevokePrivilegeForUpdate()");
#ifdef WRT_SMACK_ENABLED
if (PC_OPERATION_SUCCESS != app_revoke_permissions(m_pkgId)) {
void TaskSmack::StepAbortSmack()
{
- LogInfo("----------------> SMACK:\
+ LogDebug("----------------> SMACK:\
Jobs::WidgetInstall::TaskSmack::StepAbortSmack()");
#ifdef WRT_SMACK_ENABLED
Try
{
std::string path = m_installContext.locations->getConfigurationDir();
- LogInfo("path: " << path);
+ LogDebug("path: " << path);
processFile(path, m_installContext.widgetConfig);
}
void TaskWidgetConfig::ProcessIcon(const WrtDB::ConfigParserData::Icon& icon)
{
- LogInfo("enter");
+ LogDebug("enter");
bool isAnyIconValid = false;
//In case a default filename is passed as custom filename in config.xml, we
//need to keep a set of already processed filenames to avoid icon
if (MimeTypeUtils::isMimeTypeSupportedForIcon(type)) {
isAnyIconValid = true;
localesAvailableForIcon.insert(*i);
- LogInfo("Icon absolutePath :" << absolutePath <<
+ LogDebug("Icon absolutePath :" << absolutePath <<
", assigned locale :" << *i << ", type: " << type);
}
}
if (!isFeatureAllowed(m_installContext.widgetConfig.webAppType.appType,
it->name))
{
- LogInfo("This application type not allowed to use this feature");
+ LogDebug("This application type not allowed to use this feature");
ThrowMsg(
Exceptions::WidgetConfigFileInvalid,
"This app type [" <<
boxType = DPL::ToUTF8String((**it).m_type);
}
- LogInfo("livebox type: " << boxType);
+ LogDebug("livebox type: " << boxType);
ConfigParserData::LiveboxInfo::BoxSizeList boxSizeList =
(**it).m_boxInfo.m_boxSize;
DPL::String featureName)
{
using namespace WrtDB;
- LogInfo("AppType = [" <<
+ LogDebug("AppType = [" <<
WidgetType(appType).getApptypeToString() << "]");
- LogInfo("FetureName = [" << featureName << "]");
+ LogDebug("FetureName = [" << featureName << "]");
AppType featureType = APP_TYPE_UNKNOWN;
std::string featureStr = DPL::ToUTF8String(featureName);
(majorWidget == majorSupported && minorWidget == minorSupported
&& microWidget > microSupported))
{
- LogInfo("Platform doesn't support this widget.");
+ LogDebug("Platform doesn't support this widget.");
return false;
}
return true;
void WidgetUnzip::unzipProgress(const std::string &destination)
{
// Show file info
- LogInfo("Unzipping: '" << m_zipIterator->name <<
+ LogDebug("Unzipping: '" << m_zipIterator->name <<
"', Comment: '" << m_zipIterator->comment <<
"', Compressed size: " << m_zipIterator->compressedSize <<
", Uncompressed size: " << m_zipIterator->uncompressedSize);
// Check whether there are more files to extract
if (++m_zipIterator == m_zip->end()) {
- LogInfo("Unzip progress finished successfuly");
+ LogDebug("Unzip progress finished successfuly");
} else {
unzipProgress(destination);
}
ret = drm_oem_sapps_is_drm_file(source.c_str(), source.length());
dlclose(pHandle);
if (1 == ret) {
- LogInfo(source << " is DRM file");
+ LogDebug(source << " is DRM file");
return true;
}
- LogInfo(source << " isn't DRM file");
+ LogDebug(source << " isn't DRM file");
return false;
}
decryptedSource.c_str(), decryptedSource.length());
dlclose(pHandle);
if (1 == ret) {
- LogInfo(source << " is decrypted : " << decryptedSource);
+ LogDebug(source << " is decrypted : " << decryptedSource);
return true;
}
return false;
std::string WidgetUnzip::getDecryptedPackage(const std::string &source)
{
- LogInfo("Check DRM...");
+ LogDebug("Check DRM...");
if (isDRMPackage(source)) {
std::string decryptedFile;
size_t found = source.find_last_of(".wgt");
void WidgetUnzip::unzipWgtFile(const std::string &source, const std::string &destination)
{
- LogInfo("Prepare to unzip...");
+ LogDebug("Prepare to unzip...");
std::string wgtFile;
Try
{
LogDebug("wgtFile : " << wgtFile);
m_zip.reset(new DPL::ZipInput(wgtFile));
- LogInfo("Widget package comment: " << m_zip->GetGlobalComment());
+ LogDebug("Widget package comment: " << m_zip->GetGlobalComment());
// Widget package must not be empty
if (m_zip->empty()) {
m_zip.reset();
// Done
- LogInfo("Unzip finished");
+ LogDebug("Unzip finished");
}
Catch(DPL::ZipInput::Exception::OpenFailed)
{
m_context.installedPath =
DPL::Utils::Path(*dao.getWidgetInstalledPath());
- LogInfo("Widget model exists. App id : " << m_context.tzAppid);
+ LogDebug("Widget model exists. App id : " << m_context.tzAppid);
AddTask(new TaskSmack(m_context));
AddTask(new TaskCheck(m_context));
ThrowMsg(Exceptions::AppIsRunning,
"Widget is not stopped. Cannot uninstall!");
}
- LogInfo("terminate application");
+ LogDebug("terminate application");
}
}
- LogInfo("Widget Can be uninstalled. Pkgname : " << m_context.tzAppid);
+ LogDebug("Widget Can be uninstalled. Pkgname : " << m_context.tzAppid);
m_context.job->UpdateProgress(UninstallerContext::UNINSTALL_PRECHECK,
"Uninstall pre-checking Finished");
}
if (ret < 0) {
LogDebug("failed to delete box info");
} else {
- LogInfo("delete box info: " << m_context.tzAppid);
+ LogDebug("delete box info: " << m_context.tzAppid);
}
}
} //namespace WidgetUninstall
void TaskRemoveFiles::StepRemoveInstallationDirectory()
{
- LogInfo("StepRemoveInstallationDirectory started");
+ LogDebug("StepRemoveInstallationDirectory started");
Try {
int ret = app2ext_get_app_location(m_context.tzPkgid.c_str());
void TaskRemoveFiles::StepRemoveFinished()
{
- LogInfo("StepRemoveFinished finished");
+ LogDebug("StepRemoveFinished finished");
m_context.job->UpdateProgress(
UninstallerContext::UNINSTALL_REMOVE_FINISHED,
void TaskSmack::Step()
{
- LogInfo(
+ LogDebug(
"------------------------> SMACK: Jobs::WidgetUninstall::TaskSmack::Step()");
#ifdef WRT_SMACK_ENABLED
const char* pkgId = m_context.tzPkgid.c_str();
void TaskUninstallOspsvc::StepUninstallOspsvc()
{
- LogInfo("Step : Uninstall Osp service ");
+ LogDebug("Step : Uninstall Osp service ");
std::ostringstream commStr;
commStr << OSP_INSTALL_STR << BashUtils::escape_arg(m_context.tzPkgid);
pclose(fd);
- LogInfo("Widget Can be uninstalled. Pkgname : " << m_context.tzPkgid);
+ LogDebug("Widget Can be uninstalled. Pkgname : " << m_context.tzPkgid);
m_context.job->UpdateProgress(UninstallerContext::UNINSTALL_REMOVE_OSPSVC,
"Uninstall OSP service finished");
}
return false;
} catch (Jobs::JobExceptionBase &exc) {
//start revert job
- LogInfo("Exception occured: " << exc.getParam() <<
+ LogDebug("Exception occured: " << exc.getParam() <<
". Reverting job...");
bool hasAbortSteps = job->Abort();
job->SetUndoType(true);
WrtDB::WidgetDAOReadOnly widgetDao(tzAppid);
WidgetFeatureSet featureSet = widgetDao.getFeaturesList();
FOREACH(it, featureSet) {
- LogInfo("Feature name : " << it->name);
+ LogDebug("Feature name : " << it->name);
WrtDB::DeviceCapabilitySet dcs;
if (!DPL::StringCompare(it->name, PRIVILEGE_TESTAUTOMATION)) {
// special privilege
dcs = WrtDB::GlobalDAOReadOnly::GetDeviceCapability(it->name);
}
FOREACH(devCap, dcs) {
- LogInfo("--- dev cap : " << *devCap);
+ LogDebug("--- dev cap : " << *devCap);
}
Feature feature(*it, dcs);
m_featureList.push_back(feature);
bool PkgmgrSignal::initialize(int argc, char* argv[])
{
if (m_handle) {
- LogInfo("Release already allocated pkgmgr handle");
+ LogDebug("Release already allocated pkgmgr handle");
pkgmgr_installer_free(m_handle);
m_handle = NULL;
}
}
m_pkgname = name;
- LogInfo("Success to set tizen package name: " << m_pkgname);
+ LogDebug("Success to set tizen package name: " << m_pkgname);
return true;
}
return false;
}
- LogInfo("Success to send pkgmgr signal: " << key <<
+ LogDebug("Success to send pkgmgr signal: " << key <<
" - " << value);
return true;
}
// Callback
apiStr->status_callback(tizenId, errorStatus, apiStr->userdata);
} else {
- LogInfo("installFinishedCallback: No callback");
+ LogDebug("installFinishedCallback: No callback");
}
}
// Callback
apiStr->status_callback(tizenId, errorStatus, apiStr->userdata);
} else {
- LogInfo("uninstallFinishedCallback: No callback");
+ LogDebug("uninstallFinishedCallback: No callback");
}
}
apiStr->statusCallback(errorStatus, apiStr->userdata);
} else {
- LogInfo("PluginInstallFinishedCallback: No callback");
+ LogDebug("PluginInstallFinishedCallback: No callback");
}
delete apiStr;
if (apiStr->progress_callback) {
//CALLBACK EXEC
- LogInfo("Entered " << percent << "% " << description);
+ LogDebug("Entered " << percent << "% " << description);
apiStr->progress_callback(static_cast<float>(percent),
description.c_str(),
apiStr->userdata);
} else {
- LogInfo("installProgressCallback: ignoring NULL callback pointer");
+ LogDebug("installProgressCallback: ignoring NULL callback pointer");
}
}
} //namespace
int ret = 0;
- LogInfo("Try to lock for plugins installation.");
+ LogDebug("Try to lock for plugins installation.");
s_plugin_install_lock_fd =
open(PLUGIN_INSTALL_LOCK_FILE, O_RDONLY | O_CREAT, 0666);
bool unlockPluginInstallation(bool isPreload)
{
- LogInfo("Unlock for plugins installation.");
+ LogDebug("Unlock for plugins installation.");
if (isPreload) {
fprintf(stderr, "Skip plugin unlock.. \n");
return true;
void WrtInstaller::OnStop()
{
- LogInfo("Stopping Dummy Client");
+ LogDebug("Stopping Dummy Client");
}
void WrtInstaller::OnCreate()
{
- LogInfo("Creating DummyClient");
+ LogDebug("Creating DummyClient");
fprintf(stderr,
"===========================================================\n");
fprintf(stderr, "# wrt-installer #\n");
if (!m_startupPluginInstallation) {
AddStep(&WrtInstaller::installPluginsStep);
} else {
- LogInfo("Plugin installation alredy started");
+ LogDebug("Plugin installation alredy started");
}
} else if (arg == "-i" || arg == "--install") {
if (m_argc != 3) {
struct stat info;
if (-1 != stat(m_argv[2], &info) && S_ISDIR(info.st_mode)) {
- LogInfo("Installing package directly from directory");
+ LogDebug("Installing package directly from directory");
m_installMode.extension = InstallMode::ExtensionType::DIR;
} else {
- LogInfo("Installing from regular location");
+ LogDebug("Installing from regular location");
m_installMode.extension = InstallMode::ExtensionType::WGT;
}
m_packagePath = m_argv[2];
if (m_argc != 3) {
return showHelpAndQuit();
}
- LogInfo("Installing package directly from directory");
+ LogDebug("Installing package directly from directory");
m_installMode.command = InstallMode::Command::REINSTALL;
m_installMode.extension = InstallMode::ExtensionType::DIR;
m_packagePath = m_argv[2];
m_packagePath = m_argv[4];
struct stat info;
if (-1 != stat(m_argv[4], &info) && S_ISDIR(info.st_mode)) {
- LogInfo("Installing package directly from directory");
+ LogDebug("Installing package directly from directory");
m_installMode.extension = InstallMode::ExtensionType::DIR;
} else {
- LogInfo("Installing from regular location");
+ LogDebug("Installing from regular location");
m_installMode.extension = InstallMode::ExtensionType::WGT;
}
AddStep(&WrtInstaller::installStep);
fprintf(stderr, "Installing plugins ...\n");
if (m_startupPluginInstallation) {
- LogInfo("Plugin installation started because new plugin package found");
+ LogDebug("Plugin installation started because new plugin package found");
} else if (!PluginUtils::lockPluginInstallation(
m_installMode.installTime == InstallMode::InstallTime::PRELOAD))
{
return;
}
- LogInfo("Plugin DIRECTORY IS" << PLUGIN_PATH);
+ LogDebug("Plugin DIRECTORY IS" << PLUGIN_PATH);
std::list<std::string> pluginsPaths;
struct dirent libdir;
//set nb of plugins to install
//this value indicate how many callbacks are expected
m_numPluginsToInstall = pluginsPaths.size();
- LogInfo("Plugins to install: " << m_numPluginsToInstall);
+ LogDebug("Plugins to install: " << m_numPluginsToInstall);
m_pluginsPaths = pluginsPaths;
m_totalPlugins = m_numPluginsToInstall;
//remove installation request
if (!PluginUtils::removeInstallationRequiredFlag()) {
- LogInfo("Failed to remove file initializing plugin installation");
+ LogDebug("Failed to remove file initializing plugin installation");
}
//remove lock file
if (!PluginUtils::unlockPluginInstallation(
This->m_installMode.installTime == InstallMode::InstallTime::PRELOAD))
{
- LogInfo("Failed to remove installation lock");
+ LogDebug("Failed to remove installation lock");
}
This->DPL::Event::ControllerEventHandler<WRTInstallerNS::NextStepEvent>
std::string path = std::string(data->pluginPath);
- LogInfo("Plugin Installation: " << path <<
+ LogDebug("Plugin Installation: " << path <<
" progress: " << percent <<
"description " << description);
}
void* /*userdata*/)
{
//WrtInstaller *This = static_cast<WrtInstaller*>(userdata);
- LogInfo(" progress: " << percent <<
+ LogDebug(" progress: " << percent <<
" description: " << description);
}
void WrtInstaller::staticWrtUninstallProgressCallback(float percent,
void* /*userdata*/)
{
//WrtInstaller *This = static_cast<WrtInstaller*>(userdata);
- LogInfo(" progress: " << percent <<
+ LogDebug(" progress: " << percent <<
" description: " << description);
}
if (!PluginUtils::lockPluginInstallation(
m_installMode.installTime == InstallMode::InstallTime::PRELOAD))
{
- LogInfo("Lock NOT created");
+ LogDebug("Lock NOT created");
return;
}
DPL::Log::LogSystemSingleton::Instance().SetTag("WRT");
try {
- LogInfo("[WRT-API] INITIALIZING WRT INSTALLER...");
- LogInfo("[WRT-API] BUILD: " << __TIMESTAMP__);
+ LogDebug("[WRT-API] INITIALIZING WRT INSTALLER...");
+ LogDebug("[WRT-API] BUILD: " << __TIMESTAMP__);
// Touch InstallerController Singleton
InstallerMainThreadSingleton::Instance().TouchArchitecture();
InstallerMainThreadSingleton::Instance().AttachDatabases();
- LogInfo("Prepare libxml2 to work in multithreaded program.");
+ LogDebug("Prepare libxml2 to work in multithreaded program.");
xmlInitParser();
// Initialize Language Subtag registry
InitializeEvent());
if (callback) {
- LogInfo("[WRT-API] WRT INSTALLER INITIALIZATION CALLBACK");
+ LogDebug("[WRT-API] WRT INSTALLER INITIALIZATION CALLBACK");
callback(WRT_SUCCESS, userdata);
}
} catch (const DPL::Exception& ex) {
void wrt_installer_shutdown()
{
try {
- LogInfo("[WRT-API] DEINITIALIZING WRT INSTALLER...");
+ LogDebug("[WRT-API] DEINITIALIZING WRT INSTALLER...");
// Installer termination
CONTROLLER_POST_SYNC_EVENT(
ValidationCore::VCoreDeinit();
// Global deinit check
- LogInfo("Cleanup libxml2 global values.");
+ LogDebug("Cleanup libxml2 global values.");
xmlCleanupParser();
} catch (const DPL::Exception& ex) {
LogError("Internal Error during Shutdown:");
DPL::Log::LogSystemSingleton::Instance().AddProvider(oldStyleProvider);
}
- LogInfo("[WRT-API] INSTALL WIDGET: " << path);
+ LogDebug("[WRT-API] INSTALL WIDGET: " << path);
// Post installation event
CONTROLLER_POST_EVENT(
Logic::InstallerController,
UNHANDLED_EXCEPTION_HANDLER_BEGIN
{
std::string tizenAppid(tzAppid);
- LogInfo("[WRT-API] UNINSTALL WIDGET: " << tizenAppid);
+ LogDebug("[WRT-API] UNINSTALL WIDGET: " << tizenAppid);
// Post uninstallation event
CONTROLLER_POST_EVENT(
Logic::InstallerController,
{
UNHANDLED_EXCEPTION_HANDLER_BEGIN
{
- LogInfo("[WRT-API] INSTALL PLUGIN: " << pluginDir);
+ LogDebug("[WRT-API] INSTALL PLUGIN: " << pluginDir);
//Private data for status callback
//Resource is free in pluginInstallFinishedCallback
InstallerCallbacksTranslate::PluginStatusCallbackStruct*
int main (int argc, char *argv[])
{
- LogInfo("Starting tests");
+ LogDebug("Starting tests");
WrtDB::WrtDatabase::attachToThreadRW();
int status =