From 0fc038aea925a8d7b213019f055f23b146623d49 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Thu, 21 Nov 2024 22:27:58 -0600 Subject: [PATCH] Fix apt install functionality in pkgselectprocess. --- common/modules/pkgselectprocess/PackageSelectProcess.cpp | 6 +++--- debian/changelog | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/modules/pkgselectprocess/PackageSelectProcess.cpp b/common/modules/pkgselectprocess/PackageSelectProcess.cpp index cb92ceb..01279f6 100644 --- a/common/modules/pkgselectprocess/PackageSelectProcess.cpp +++ b/common/modules/pkgselectprocess/PackageSelectProcess.cpp @@ -289,10 +289,10 @@ Calamares::JobResult PackageSelectProcess::exec() qDebug() << "Progress range: installStart:" << installStart << "installEnd:" << installEnd; if (!debPackages.isEmpty()) { - const QString packageList = debPackages.join(" -e "); + const QString packageList = debPackages.join(" "); const QString installCommand = QString( - "DEBIAN_FRONTEND=noninteractive apt-get -y install $(apt-cache --no-generate pkgnames %1 | grep -Fx -e %2)" - ).arg(debPackages.join(" ")).arg(packageList); + "DEBIAN_FRONTEND=noninteractive apt-get -y install $(for pkg in %1; do dpkg -s \"$pkg\" &>/dev/null || echo -n \"$pkg \"; done)" + ).arg(packageList); Calamares::JobResult installResult = runAptCommand(installCommand, rootMountPoint, diff --git a/debian/changelog b/debian/changelog index 7822568..d933530 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ calamares-settings-ubuntu (1:25.04.8) UNRELEASED; urgency=medium * Add new global storage value for stacked squashfses and adjust config. * Switch Lubuntu to dracut. + * Fix apt install functionality in pkgselectprocess. -- Simon Quigley Wed, 20 Nov 2024 23:58:39 -0600