Fixed RDS install failed
authorSoyoung Kim <sy037.kim@samsung.com>
Fri, 28 Jun 2013 14:40:37 +0000 (23:40 +0900)
committerSoyoung Kim <sy037.kim@samsung.com>
Fri, 28 Jun 2013 15:14:03 +0000 (00:14 +0900)
[Issue#] N/A
[Problem] RDS update failed.
[Cause] because signature file can't find.
[Solution] fixed path of signature file when RDS mode.
[SCMRequest] N/A

Change-Id: I6673b1eefdcc1aa5eb4a68e5b469b2a39001e61a

src/jobs/widget_install/task_certify.cpp

index 6223426..2b3d81d 100644 (file)
@@ -199,6 +199,7 @@ void TaskCertify::processAuthorSignature(const SignatureData &data)
 
 void TaskCertify::getSignatureFiles(std::string path, SignatureFileInfoSet& file)
 {
+    LogDebug("path : " << path);
     SignatureFileInfoSet signatureFiles;
     SignatureFinder signatureFinder(path);
     if (SignatureFinder::NO_ERROR != signatureFinder.find(file)) {
@@ -215,14 +216,20 @@ void TaskCertify::stepSignature()
     std::string widgetPath;
     widgetPath = m_contextData.locations->getTemporaryPackageDir() + "/";
 
+    if (m_contextData.mode.command ==
+            InstallMode::Command::REINSTALL)
+    {
+        widgetPath = m_contextData.locations->getPackageInstallationDir() + "/";
+    }
+
     SignatureFileInfoSet signatureFiles;
 
     Try {
         getSignatureFiles(widgetPath, signatureFiles);
 
         if (signatureFiles.size() <= 0) {
-            widgetPath = m_contextData.locations->getTemporaryPackageDir() +
-                WrtDB::GlobalConfig::GetWidgetSrcPath() + "/";
+            widgetPath += std::string(WrtDB::GlobalConfig::GetWidgetSrcPath())
+                + "/";
             if (0 == access(widgetPath.c_str(), F_OK)) {
                 getSignatureFiles(widgetPath, signatureFiles);
             }