]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
debian: do not assume package files are versioned 1659/head
authorLuca Boccassi <bluca@debian.org>
Tue, 4 Jul 2023 00:37:14 +0000 (01:37 +0100)
committerLuca Boccassi <bluca@debian.org>
Tue, 4 Jul 2023 00:37:14 +0000 (01:37 +0100)
When creating a mirror the package names might not be versioned,
so if partition(_) leaves the suffix, strip it, otherwise apt
will fail

mkosi/distributions/debian.py

index 7a5097f5063b924277793279cdcefc8aea369629..cb196c9ba30da5efabc6335e7eae884698d2a4a6 100644 (file)
@@ -100,7 +100,7 @@ class DebianInstaller(DistributionInstaller):
         # Finally, run apt to properly install packages in the chroot without having to worry that maintainer
         # scripts won't find basic tools that they depend on.
 
-        cls.install_packages(state, [Path(deb).name.partition("_")[0] for deb in essential])
+        cls.install_packages(state, [Path(deb).name.partition("_")[0].removesuffix(".deb") for deb in essential])
 
     @classmethod
     def install_packages(cls, state: MkosiState, packages: Sequence[str], apivfs: bool = True) -> None: