diff options
author | Joseph Pirozzo <pirozzoj@google.com> | 2019-05-08 01:12:33 +0000 |
---|---|---|
committer | Joseph Pirozzo <pirozzoj@google.com> | 2019-05-08 01:42:18 +0000 |
commit | b097207ca25f94d157496d66dd8483a73a850647 (patch) | |
tree | 9b28631f6f49aae8d13d91a1a6510c50343ab8a2 | |
parent | a32ccec1c4d247e29eef4288706c303b9e71f08b (diff) | |
download | platform_system_apex-b097207ca25f94d157496d66dd8483a73a850647.tar.gz platform_system_apex-b097207ca25f94d157496d66dd8483a73a850647.tar.bz2 platform_system_apex-b097207ca25f94d157496d66dd8483a73a850647.zip |
Revert "Don't mount non-flattened apexes if device doesn't support them"
This reverts commit a32ccec1c4d247e29eef4288706c303b9e71f08b.
Reason for revert: Prevents Automotive devices from booting.
Bug: 132181909
Change-Id: Iac539a9c45b4db24902b33715515c6c63afa3a41
-rw-r--r-- | apexd/apexd.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/apexd/apexd.cpp b/apexd/apexd.cpp index ad8aa7ea..9f7b23d1 100644 --- a/apexd/apexd.cpp +++ b/apexd/apexd.cpp @@ -397,12 +397,6 @@ StatusOr<MountedApexData> mountNonFlattened(const ApexFile& apex, using StatusM = StatusOr<MountedApexData>; const std::string& full_path = apex.GetPath(); - if (!kUpdatable) { - return StatusM::Fail(StringLog() - << "Unable to mount non-flattened apex package " - << full_path << " because device doesn't support it"); - } - loop::LoopbackDeviceUniqueFd loopbackDevice; for (size_t attempts = 1;; ++attempts) { StatusOr<loop::LoopbackDeviceUniqueFd> ret = loop::createLoopDevice( @@ -1316,8 +1310,6 @@ Status scanPackagesDirAndActivate(const char* apex_package_dir) { const auto& packages_with_code = GetActivePackagesMap(); std::vector<std::string> failed_pkgs; - size_t activated_cnt = 0; - size_t skipped_cnt = 0; for (const std::string& name : *scan) { LOG(INFO) << "Found " << name; @@ -1336,14 +1328,6 @@ Status scanPackagesDirAndActivate(const char* apex_package_dir) { LOG(INFO) << "Skipping activation of " << name << " same package with higher version " << it->second << " is already active"; - skipped_cnt++; - continue; - } - - if (!kUpdatable && !apex_file->IsFlattened()) { - LOG(INFO) << "Skipping activation of non-flattened apex package " << name - << " because device doesn't support it"; - skipped_cnt++; continue; } @@ -1352,8 +1336,6 @@ Status scanPackagesDirAndActivate(const char* apex_package_dir) { LOG(ERROR) << "Failed to activate " << name << " : " << res.ErrorMessage(); failed_pkgs.push_back(name); - } else { - activated_cnt++; } } @@ -1363,8 +1345,7 @@ Status scanPackagesDirAndActivate(const char* apex_package_dir) { << Join(failed_pkgs, ',')); } - LOG(INFO) << "Activated " << activated_cnt - << " packages. Skipped: " << skipped_cnt; + LOG(INFO) << "Activated " << scan->size() << " packages"; return Status::Success(); } |