diff --git a/common/modules/pkgselectprocess/PackageSelectProcess.cpp b/common/modules/pkgselectprocess/PackageSelectProcess.cpp index df7d25f..6ca3c04 100644 --- a/common/modules/pkgselectprocess/PackageSelectProcess.cpp +++ b/common/modules/pkgselectprocess/PackageSelectProcess.cpp @@ -407,6 +407,8 @@ Calamares::JobResult PackageSelectProcess::exec() true); if (!cpbe->remove()) qDebug() << "Warning: failed to clean up /usr/libexec/checkpackage-backend"; if (!installResult) return std::move(installResult); + } else { + if (!cpbe->remove()) qDebug() << "Warning: failed to clean up /usr/libexec/checkpackage-backend"; } } else qDebug() << "No packages to install."; @@ -433,16 +435,14 @@ Calamares::JobResult PackageSelectProcess::exec() const double removeEnd = removeStart + 0.2 * aptRange; if (!removeDebPackages.isEmpty()) { - const QString removeCommand = QString("DEBIAN_FRONTEND=noninteractive apt-get -y --purge remove %1") + const QString removeCommand = QString("DEBIAN_FRONTEND=noninteractive apt-get -y --purge remove $(/usr/libexec/checkpackage-backend %1);") .arg(removeDebPackages.join(" ")); Calamares::JobResult removeResult = runAptCommand(removeCommand, rootMountPoint, removeStart, removeEnd, true); - if (!removeResult) { // Using operator bool() to check for errors - return std::move(removeResult); // Move to avoid copy - } + if (!removeResult) return std::move(removeResult); } const double autoremoveStart = removeEnd; diff --git a/debian/changelog b/debian/changelog index be14676..b779485 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ calamares-settings-ubuntu (1:25.04.26) UNRELEASED; urgency=medium on these items. If you are a downstream, please be careful. * [pkgselectprocess] Ensure hasInternet is available as a local variable, so we can use it. + * [pkgselectprocess] When running apt remove, use CPBE just in case. -- Simon Quigley Tue, 15 Apr 2025 22:15:17 -0500