namespace {
typedef std::map<DPL::String, DPL::String> LanguageTagMap;
-const char* const ST_TRUE = "true";
-const char* const ST_NODISPLAY = "nodisplay";
+const char* const STR_TRUE = "true";
+const char* const STR_FALSE = "false";
+const char* const STR_NODISPLAY = "nodisplay";
LanguageTagMap getLanguageTagMap()
{
{
int code = 0;
- if (!access(commit_manifest.c_str(), F_OK) == 0) {
+ char* updateTags[3] = {NULL, };
+
+ if (!m_context.mode.removable) {
+ updateTags[0] = "preload=false";
+ updateTags[1] = "removable=false";
+ updateTags[2] = NULL;
+ }
+
+ if (!access(commit_manifest.c_str(), F_OK) == 0) {
commitManifest();
code = pkgmgr_parser_parse_manifest_for_installation(
- commit_manifest.c_str(), NULL);
+ commit_manifest.c_str(), (updateTags[0] == NULL) ? NULL : updateTags);
if (code != 0) {
LogError("Manifest parser error: " << code);
{
commitManifest();
code = pkgmgr_parser_parse_manifest_for_upgrade(
- commit_manifest.c_str(), NULL);
+ commit_manifest.c_str(), (updateTags[0] == NULL) ? NULL : updateTags);
if (code != 0) {
LogError("Manifest parser error: " << code);
{
FOREACH(it, m_context.widgetConfig.configInfo.settingsList)
{
- if (!strcmp(DPL::ToUTF8String(it->m_name).c_str(), ST_NODISPLAY)) {
- if (!strcmp(DPL::ToUTF8String(it->m_value).c_str(), ST_TRUE)) {
+ if (!strcmp(DPL::ToUTF8String(it->m_name).c_str(), STR_NODISPLAY)) {
+ if (!strcmp(DPL::ToUTF8String(it->m_value).c_str(), STR_TRUE)) {
uiApp.setNodisplay(true);
uiApp.setTaskmanage(false);
} else {
return showHelpAndQuit();
}
m_packagePath = it->second;
+
+ it = m_CSCconfigurationMap.find(
+ CSCConfiguration::KEY_REMOVABLE);
+ if (it == m_CSCconfigurationMap.end()) {
+ return showHelpAndQuit();
+ }
+
+ m_installMode.removable =
+ (it->second.compare(CSCConfiguration::VALUE_FALSE) == 0)
+ ? false : true;
+
AddStep(&WrtInstaller::installStep);
LogDebug("path = " << m_packagePath);
} else if (it->second == CSCConfiguration::VALUE_UNINSTALL) {
typedef std::pair<std::string, std::string> dataPair;
const char* const KEY_OP = "op";
const char* const KEY_PATH = "path";
+const char* const KEY_REMOVABLE = "removable";
const char* const VALUE_INSTALL = "install";
const char* const VALUE_UNINSTALL = "uninstall";
+const char* const VALUE_TRUE = "true";
+const char* const VALUE_FALSE = "false";
}
enum ReturnValue