clear 'rpm' related code 33/59733/2 accepted/tizen/ivi/20160222.011634 accepted/tizen/mobile/20160222.011423 accepted/tizen/tv/20160222.011510 accepted/tizen/wearable/20160222.011549 submit/tizen/20160219.102650
authorjongmyeongko <jongmyeong.ko@samsung.com>
Thu, 18 Feb 2016 03:48:50 +0000 (12:48 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Fri, 19 Feb 2016 02:12:34 +0000 (18:12 -0800)
Change-Id: Ic99216d87ba5764dd80679084fc11a598f5e466f
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/common/step/step_configure.cc
src/common/step/step_parse_manifest.cc

index 7d8dfd7..d9a27c7 100644 (file)
@@ -20,7 +20,6 @@ namespace bs = boost::system;
 namespace common_installer {
 namespace configuration {
 
-const char kRpmPackageType[] = "rpm";
 const char kStrEmpty[] = "";
 
 StepConfigure::StepConfigure(InstallerContext* context, PkgMgrPtr pkgmgr)
@@ -85,7 +84,6 @@ Step::Status StepConfigure::process() {
       context_->unpacked_dir_path.set(package_directory);
       context_->pkg_path.set(package_directory);
       context_->xml_path.set(xml_path);
-      context_->pkg_type.set(kRpmPackageType);  // temporary fix as rpm
 
       // TODO(t.iwanek): setting privilege level here should be removed because
       // of the fact that many apps may not have PLATFORM level. User can
index d24e2d3..1a2c457 100644 (file)
@@ -164,10 +164,7 @@ bool StepParseManifest::FillPackageInfo(manifest_x* manifest) {
   manifest->version = strdup(pkg_info->version().c_str());
   manifest->installlocation = strdup(pkg_info->install_location().c_str());
   manifest->api_version = strdup(pkg_info->api_version().c_str());
-  if (context_->pkg_type.get().compare("rpm") == 0)
-    manifest->type = strdup("rpm");
-  else
-    manifest->type = strdup("tpk");
+  manifest->type = strdup("tpk");
   manifest->preload = strdup(pkg_info->preload().c_str());
 
   for (auto& pair : pkg_info->labels()) {
@@ -293,7 +290,7 @@ bool StepParseManifest::FillWidgetApplication(manifest_x* manifest) {
     widget_app->package = strdup(manifest->package);
     widget_app->support_disable = strdup(manifest->support_disable);
     manifest->application = g_list_append(manifest->application, widget_app);
-    if (strncmp(context_->pkg_type.get().c_str(), "rpm", strlen("rpm")) == 0)
+    if (bf::path(application.app_info.exec().c_str()).is_absolute())
       widget_app->exec = strdup(application.app_info.exec().c_str());
     else
       widget_app->exec = strdup((context_->root_application_path.get()
@@ -351,7 +348,7 @@ bool StepParseManifest::FillServiceApplication(manifest_x* manifest) {
     service_app->package = strdup(manifest->package);
     service_app->support_disable = strdup(manifest->support_disable);
     manifest->application = g_list_append(manifest->application, service_app);
-    if (strncmp(context_->pkg_type.get().c_str(), "rpm", strlen("rpm")) == 0)
+    if (bf::path(application.app_info.exec().c_str()).is_absolute())
       service_app->exec = strdup(application.app_info.exec().c_str());
     else
       service_app->exec = strdup((context_->root_application_path.get()
@@ -429,7 +426,7 @@ bool StepParseManifest::FillUIApplication(manifest_x* manifest) {
     ui_app->package = strdup(manifest->package);
     ui_app->support_disable = strdup(manifest->support_disable);
     manifest->application = g_list_append(manifest->application, ui_app);
-    if (strncmp(context_->pkg_type.get().c_str(), "rpm", strlen("rpm")) == 0)
+    if (bf::path(application.app_info.exec().c_str()).is_absolute())
       ui_app->exec = strdup(application.app_info.exec().c_str());
     else
       ui_app->exec = strdup((context_->root_application_path.get()