From: Luca Boccassi Date: Tue, 4 Jul 2023 00:37:14 +0000 (+0100) Subject: debian: do not assume package files are versioned X-Git-Tag: v15~90^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1659%2Fhead;p=thirdparty%2Fmkosi.git debian: do not assume package files are versioned When creating a mirror the package names might not be versioned, so if partition(_) leaves the suffix, strip it, otherwise apt will fail --- diff --git a/mkosi/distributions/debian.py b/mkosi/distributions/debian.py index 7a5097f50..cb196c9ba 100644 --- a/mkosi/distributions/debian.py +++ b/mkosi/distributions/debian.py @@ -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: