Skip to content

Commit c8eb59d

Browse files
committed
Revert "Do not preserve owner user/group when extracting tar archive"
This reverts commit 75e592d. This fixes mixed build boot tests: ``` $ cvd fetch --default_build=15280243/cf_x86_64_only_phone-trunk_staging-userdebug --host_package_build=15280243/cf_x86_64_only_phone-trunk_staging-userdebug --system_build=15280243/gsi_x86_64-trunk_staging-userdebug $ cvd create --product_path=$PWD --host_path=$PWD ``` The reverted commit added a new flag `--no-same-owner` to a `bsdtar` invocation. The implementation of `bsdtar` used in Android CI does not support this flag and a mixed build test that invokes `bsdtar` fails. Bug: b/506159631 and b/408497913 Test: repro given above
1 parent ac10ece commit c8eb59d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

base/cvd/cuttlefish/common/libs/utils/archive.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ Result<std::vector<std::string>> ExtractFiles(
6767
.AddParameter(target_directory)
6868
.AddParameter("-f")
6969
.AddParameter(archive)
70-
.AddParameter("-S")
71-
.AddParameter("--no-same-owner");
70+
.AddParameter("-S");
7271
for (const auto& extract : to_extract) {
7372
bsdtar_cmd.AddParameter(extract);
7473
}
@@ -140,7 +139,6 @@ std::string ExtractArchiveToMemory(const std::string& archive_filepath,
140139
bsdtar_cmd.AddParameter(archive_filepath);
141140
bsdtar_cmd.AddParameter("-O");
142141
bsdtar_cmd.AddParameter(archive_member);
143-
bsdtar_cmd.AddParameter("--no-same-owner");
144142
Result<std::string> stdout_str = RunAndCaptureStdout(std::move(bsdtar_cmd));
145143

146144
if (!stdout_str.ok()) {

0 commit comments

Comments
 (0)