Skip to content

Commit

Permalink
Remove DownloadUser from provided pacman.conf
Browse files Browse the repository at this point in the history
Fixes #3048
  • Loading branch information
DaanDeMeyer committed Oct 7, 2024
1 parent d46ce04 commit 2e04f5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mkosi/installer/pacman.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ def setup(cls, context: Context, repositories: Sequence[PacmanRepository]) -> No

config = context.sandbox_tree / "etc/pacman.conf"
if config.exists():
# If DownloadUser is specified, remove it as the user won't be available in the sandbox.
lines = config.read_text().splitlines()
lines = [line for line in lines if not line.strip().startswith("DownloadUser")]
config.write_text("\n".join(lines))
return

config.parent.mkdir(exist_ok=True, parents=True)
Expand Down

0 comments on commit 2e04f5a

Please sign in to comment.