]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
mkosi/manifest: move dpkg-query to run_workspace_command 1122/head
authorMorten Linderud <morten.linderud@mullvad.net>
Tue, 16 Aug 2022 13:52:39 +0000 (15:52 +0200)
committerMorten Linderud <morten.linderud@mullvad.net>
Tue, 16 Aug 2022 14:35:35 +0000 (16:35 +0200)
Signed-off-by: Morten Linderud <morten.linderud@mullvad.net>
mkosi/manifest.py

index 0892266df23ea0312e78a2060e6397d0457bbee6..4aaef542f566f5c7a79cfefaa0f307e10841ab2e 100644 (file)
@@ -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())