[pkgselectprocess] Compliment the previous commit by aligning installation of Calamares

To complement the last fix, ensure that Calamares ends up on the removal list
for non-stacked squashfses if and only if OEM is disabled, and Calamares shows
up on the install list only for stacked squashfses which have OEM enabled.
This nuanced approach ensures all potential combinations have the intended
functionality.
This commit is contained in:
Simon Quigley 2025-04-12 21:51:15 -05:00
parent 5a1835af47
commit de24f68f2b
2 changed files with 28 additions and 6 deletions

View File

@ -365,15 +365,19 @@ Calamares::JobResult PackageSelectProcess::exec()
const QString checkpackage_path = "/usr/libexec/checkpackage-backend";
const QString chroot_checkpackage_path = rootMountPoint + checkpackage_path;
// As part of the fix for LP: #2104343, we need to ensure that, if
// we are currently in OEM mode, Calamares and friends remain
// installed. During stage two, we clean it up.
// Corresponding to the temporary hack in pkgselect adding calamares
// and kdialog to the list, we only want those two included in the
// final installation if we're actually in OEM mode. Otherwise, they
// can be ignored, and are just clutter.
// FIXME: When the OEM stack is rewritten in 25.10, this needs to be
// rewritten.
if (QFile::exists("/etc/calamares/OEM_MODE_ACTIVATED")) {
// removed.
if (!QFile::exists("/etc/calamares/OEM_MODE_ACTIVATED")) {
QStringList wip_list;
for (auto debPackage : debPackages) {
if (!debPackage.contains(QString("calamares"))) wip_list << debPackage;
if (!debPackage.contains(QString("calamares")) &&
!debPackage.contains(QString("kdialog"))) {
wip_list << debPackage;
}
}
debPackages = wip_list;
}
@ -408,6 +412,19 @@ Calamares::JobResult PackageSelectProcess::exec()
removeDebPackages << var.toString();
}
// As part of the fix for LP: #2104343, we need to ensure that, if
// we are currently in OEM mode, Calamares and friends remain
// installed. During stage two, we clean it up.
// FIXME: When the OEM stack is rewritten in 25.10, this needs to be
// rewritten.
if (QFile::exists("/etc/calamares/OEM_MODE_ACTIVATED")) {
QStringList wip_list;
for (auto removeDebPackage : removeDebPackages) {
if (!removeDebPackage.contains(QString("calamares"))) wip_list << removeDebPackage;
}
removeDebPackages = wip_list;
}
const double removeStart = installEnd;
const double removeEnd = removeStart + 0.2 * aptRange;

5
debian/changelog vendored
View File

@ -13,6 +13,11 @@ calamares-settings-ubuntu (1:25.04.25) UNRELEASED; urgency=medium
about stacked squashfses, it's what provides the final "additional install
list" to be considered by checkpackage-backend, and this is a temporary
fix anyway (LP: #2104343).
* [pkgselectprocess] To complement the last fix, ensure that Calamares ends
up on the removal list for non-stacked squashfses if and only if OEM is
disabled, and Calamares shows up on the install list only for stacked
squashfses which have OEM enabled. This nuanced approach ensures all
potential combinations have the intended functionality.
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 12 Apr 2025 00:23:39 -0500