Merge pull request #1584 from ogayot/mirror-testing-apt-warning

apt: force downloads to be unsandboxed when running mirror testing
This commit is contained in:
Dan Bungert 2023-03-06 12:00:11 -07:00 committed by GitHub
commit cfeb3fe163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -168,7 +168,13 @@ class AptConfigurer:
except (PermissionError, LookupError) as exc:
log.warning("could to set owner of file %s: %r", partial_dir, exc)
apt_cmd = ["apt-get", "update", "-oAPT::Update::Error-Mode=any"]
apt_cmd = [
"apt-get", "update",
"-oAPT::Update::Error-Mode=any",
# Workaround because the default sandbox user (i.e., _apt) does not
# have access to the overlay.
"-oAPT::Sandbox::User=root",
]
for key, path in apt_dirs.items():
value = "" if path is None else str(path)