From: Morten Linderud Date: Tue, 16 Aug 2022 13:52:39 +0000 (+0200) Subject: mkosi/manifest: move dpkg-query to run_workspace_command X-Git-Tag: v14~81^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1122%2Fhead;p=thirdparty%2Fmkosi.git mkosi/manifest: move dpkg-query to run_workspace_command Signed-off-by: Morten Linderud --- 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())