Redefine wgt package version policy 08/251908/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 21 Jan 2021 00:10:28 +0000 (09:10 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 21 Jan 2021 00:10:28 +0000 (09:10 +0900)
Installer will not check or parsing wgt version string unless it is empty.

Change-Id: Id7604b7f8735c661d883319238526719d31180bc
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/wgt/step/configuration/step_parse.cc

index 3b46e7e0436ec540973edc6eeec7579586e423ef..3b11daa0c587ca6bf5fc46d0aa6b13d803f76597 100644 (file)
@@ -175,17 +175,6 @@ std::string StepParse::GetPackageVersion(
   if (manifest_version.empty())
     return kManifestVersion;
 
-  for (const char& c : manifest_version) {
-    // first bit of 1 byte utf-8 character is always 0
-    if (c >> 7 == 1)
-      continue;
-
-    if (std::string(1, c).find_first_not_of("1234567890.") !=
-        std::string::npos) {
-      LOG(ERROR) << "Invalid version format";
-      return nullptr;
-    }
-  }
   return manifest_version;
 }
 
@@ -257,12 +246,7 @@ bool StepParse::FillWidgetInfo(manifest_x* manifest) {
   const std::string& version = wgt_info->version();
 
   manifest->ns = strdup(kTizenPackageXmlNamespace);
-  std::string version_tmp = GetPackageVersion(version);
-  if (version_tmp.empty()) {
-    LOG(ERROR) << "Invalid version format : " << version;
-    return false;
-  }
-  manifest->version = strdup(version_tmp.c_str());
+  manifest->version = strdup(GetPackageVersion(version).c_str());
 
   for (auto& item : wgt_info->description_set()) {
     description_x* description = reinterpret_cast<description_x*>