Among the steps executed in Update, there are steps that presupporse
that the root path of the package exists
If the root path of the package doesn't exist and there is package
information in the database, the update type installation is performed
and the update will fail
In this case, Install type installation is performed instead of Update
type
Change-Id: I1f5dae8a29101728a546667baf329ef08c6292af
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
#include "common/pkgmgr_registration.h"
#include "common/utils/file_util.h"
#include "common/utils/manifest_util.h"
+#include "common/utils/request.h"
#include "common/utils/user_util.h"
namespace fs = std::filesystem;
bool CheckIfAppFilesExists(const std::string& pkgid,
uid_t uid,
bool is_readonly) {
- return fs::exists(ci::GetManifestLocation(pkgid,
- uid, is_readonly));
+ return fs::exists(ci::GetManifestLocation(pkgid, uid, is_readonly)) &&
+ fs::exists(fs::path(ci::GetRootAppPath(is_readonly, uid)) / pkgid);
}
bool IsDeltaPkg(const std::string& path) {