From 6977daea2260a9c5ee848497534f69b5197d2dd3 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Fri, 25 Oct 2024 15:35:58 +0900 Subject: Skip StepClearInstallLocation in the mic step In the mic step, some files may be created in the package's location in advance before a package is installed Change-Id: I1077bc42cb4707805d7d60c3a89bdf1eb02d594a Signed-off-by: Ilho Kim --- src/common/step/filesystem/step_clear_install_location.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/step/filesystem/step_clear_install_location.cc b/src/common/step/filesystem/step_clear_install_location.cc index aaf33cec..a073289c 100644 --- a/src/common/step/filesystem/step_clear_install_location.cc +++ b/src/common/step/filesystem/step_clear_install_location.cc @@ -9,12 +9,22 @@ #include "common/installer_context.h" #include "common/utils/file_util.h" +namespace { + +constexpr const char kPathPreloadInstallOnPosttrans[] = + "/tmp/.preload_install_on_posttrans"; + +} // namespace + namespace fs = std::filesystem; namespace common_installer { namespace filesystem { Step::Status StepClearInstallLocation::process() { + if (access(kPathPreloadInstallOnPosttrans, F_OK) == 0) + return Step::Status::OK; + fs::path install_path; if (context_->storage.get() == Storage::EXTENDED) { install_path = fs::path(GetExtendedRootAppPath(context_->uid.get())) / -- cgit v1.2.3