[pkgselectprocess] When running apt remove, use CPBE just in case.

This commit is contained in:
Simon Quigley 2025-04-15 22:29:07 -05:00
parent 6cb7d4dc52
commit 3288d57e56
2 changed files with 5 additions and 4 deletions

View File

@ -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;

1
debian/changelog vendored
View File

@ -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 <tsimonq2@ubuntu.com> Tue, 15 Apr 2025 22:15:17 -0500