From 483897ae814db2ba4ac92e3d51a9a27588a6e519 Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Tue, 16 Aug 2022 15:52:39 +0200 Subject: [PATCH] mkosi/manifest: move dpkg-query to run_workspace_command Signed-off-by: Morten Linderud --- mkosi/manifest.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mkosi/manifest.py b/mkosi/manifest.py index 0892266df..4aaef542f 100644 --- a/mkosi/manifest.py +++ b/mkosi/manifest.py @@ -135,11 +135,10 @@ class Manifest: source.add(package) def record_deb_packages(self, root: Path) -> None: - c = run( - ["dpkg-query", f"--admindir={root}/var/lib/dpkg", "--show", "--showformat", + c = run_workspace_command(self.args, root, + ["dpkg-query", "--admindir=/var/lib/dpkg", "--show", "--showformat", r'${Package}\t${source:Package}\t${Version}\t${Architecture}\t${Installed-Size}\t${db-fsys:Last-Modified}\n'], - stdout=PIPE, - text=True, + capture_stdout=True ) packages = sorted(c.stdout.splitlines()) -- 2.47.2