diff --git a/common/modules/pkgselect/PackageSelectViewStep.cpp b/common/modules/pkgselect/PackageSelectViewStep.cpp index 3200eb7..6cae74c 100644 --- a/common/modules/pkgselect/PackageSelectViewStep.cpp +++ b/common/modules/pkgselect/PackageSelectViewStep.cpp @@ -238,6 +238,7 @@ void PackageSelectViewStep::onLeave() return; } + bool isStackedSquashfs = m_configurationMap.value("stacked_squashfs").toBool(); QVariantMap installationData = gs->value("installation_data").toMap(); QString installationMode = installationData.value("installation_mode").toString(); bool downloadUpdates = installationData.value("download_updates").toBool(); @@ -264,13 +265,20 @@ void PackageSelectViewStep::onLeave() globalData.insert("installation_mode", installationMode); + // Used by unpackfs on stacked squashfs systems if (installationMode == "minimal") { - QVariantList minimalPackages = m_configurationMap.value("packages").toMap().value("minimal_remove_packages").toList(); - QVariantList installerPackages = m_configurationMap.value("packages").toMap().value("installer_remove_packages").toList(); - QVariantList combinedRemove = minimalPackages + installerPackages; - globalData.insert("packages_to_remove", combinedRemove); } - else { + + if (installationMode == "minimal") { + globalData.insert("unpack_regular", false); + if (!isStackedSquashfs) { + QVariantList minimalPackages = m_configurationMap.value("packages").toMap().value("minimal_remove_packages").toList(); + QVariantList installerPackages = m_configurationMap.value("packages").toMap().value("installer_remove_packages").toList(); + QVariantList combinedRemove = minimalPackages + installerPackages; + globalData.insert("packages_to_remove", combinedRemove); + } + } else { + globalData.insert("unpack_regular", true); // For normal and full, store packages to install QVariantList selectedPackagesList; // Store the snaps that are already on the system by default @@ -317,8 +325,10 @@ void PackageSelectViewStep::onLeave() } globalData.insert("packages_to_install", selectedPackagesList); - QVariantList installerPackages = m_configurationMap.value("packages").toMap().value("installer_remove_packages").toList(); - globalData.insert("packages_to_remove", installerPackages); + if (!isStackedSquashfs) { + QVariantList installerPackages = m_configurationMap.value("packages").toMap().value("installer_remove_packages").toList(); + globalData.insert("packages_to_remove", installerPackages); + } globalData.insert("present_snaps", presentSnapList); } diff --git a/common/modules/pkgselectprocess/PackageSelectProcess.cpp b/common/modules/pkgselectprocess/PackageSelectProcess.cpp index 54efb12..cb92ceb 100644 --- a/common/modules/pkgselectprocess/PackageSelectProcess.cpp +++ b/common/modules/pkgselectprocess/PackageSelectProcess.cpp @@ -51,13 +51,13 @@ Calamares::JobResult PackageSelectProcess::runAptCommand(const QString& command, commandHRPrefix = tr("Installing packages: "); } else if (command.contains("full-upgrade")) { commandHRPrefix = tr("Upgrading installed system: "); - } else if (command.contains("autoremove")) { + } else if (command.contains("remove")) { commandHRPrefix = tr("Cleaning up packages: "); } QRegularExpression getRegex(R"(Get:\d+\s+[^ ]+\s+[^ ]+\s+(.+?)\s+\S+\s+(\S+)\s+\[(.*?)\])"); - connect(&aptProcess, &QProcess::readyReadStandardOutput, this, + connect(&aptProcess, &QProcess::readyReadStandardOutput, this, [this, &aptProcess, &lineCount, progressPerLine, startProgress, endProgress, verboseProgress, commandHRPrefix, getRegex]() mutable { while (aptProcess.canReadLine()) { QString line = QString::fromUtf8(aptProcess.readLine()).trimmed(); @@ -68,7 +68,7 @@ Calamares::JobResult PackageSelectProcess::runAptCommand(const QString& command, if (verboseProgress && !line.contains("Running in chroot, ignoring command") && !line.contains("Waiting until unit") && !line.contains("Stopping snap") && !line.contains("/dev/pts")) { - + // Process "Get:" lines to show download information if (line.startsWith("Get:")) { QRegularExpressionMatch match = getRegex.match(line); @@ -219,7 +219,7 @@ Calamares::JobResult PackageSelectProcess::exec() const QVariantList packagesToInstall = installationData.value("packages_to_install").toList(); const QVariantList packagesToRemove = installationData.value("packages_to_remove").toList(); const QVariantList presentSnaps = installationData.value("present_snaps").toList(); - + // Handle default value for rootMountPoint QString rootMountPoint = "/"; if (gs->contains("rootMountPoint")) { @@ -336,9 +336,6 @@ Calamares::JobResult PackageSelectProcess::exec() autoremoveStart, autoremoveEnd, true); - if (!autoremoveResult) { // Using operator bool() to check for errors - return std::move(autoremoveResult); // Move to avoid copy - } // Handle snap packages if (installationMode != "minimal") { diff --git a/debian/changelog b/debian/changelog index fd0274f..941224e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +calamares-settings-ubuntu (1:25.04.8) UNRELEASED; urgency=medium + + * Add new global storage value for stacked squashfses and adjust config. + + -- Simon Quigley Wed, 20 Nov 2024 23:58:39 -0600 + calamares-settings-ubuntu (1:25.04.7) plucky; urgency=medium * Change oem user in Lubuntu raspi prep to user number 60999 diff --git a/debian/control b/debian/control index 99bf3a7..80d8455 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: devel Priority: optional Maintainer: Lubuntu Developers Uploaders: Simon Quigley -Build-Depends: calamares (>= 3.3.9), +Build-Depends: calamares (>= 3.3.11), cmake, debhelper-compat (= 13), extra-cmake-modules, @@ -63,7 +63,7 @@ Description: Ubuntu Unity Calamares Settings and Branding Package: calamares-settings-ubuntu-common Architecture: any -Depends: calamares (>= 3.3.9), +Depends: calamares (>= 3.3.11), cryptsetup, kdialog, keyutils, diff --git a/lubuntu/modules/pkgselect.conf b/lubuntu/modules/pkgselect.conf index ff43dbb..5f6e613 100644 --- a/lubuntu/modules/pkgselect.conf +++ b/lubuntu/modules/pkgselect.conf @@ -1,4 +1,5 @@ --- +stacked_squashfs: true packages: additional_packages: - id: "element-desktop" @@ -17,32 +18,6 @@ packages: name: "Krita" description: "Graphics editor designed primarily for digital art and 2D animation." snap: true - minimal_remove_packages: - - snapd - - snapd-installation-monitor - - vlc - - plasma-discover - - transmission-qt - - quassel - - 2048-qt - - featherpad - - noblenote - - kcalc - - qps - - zsync - - partitionmanager - - qapt-deb-installer - - picom - - qlipper - - qtpass - - "libreoffice*" - installer_remove_packages: - - "^live-*" - - calamares-settings-lubuntu - - calamares - - zram-config - - cifs-utils - - lubuntu-installer-prompt regular_install_packages: - language-pack-$LOCALE - language-pack-gnome-$LOCALE diff --git a/lubuntu/modules/unpackfs.conf b/lubuntu/modules/unpackfs.conf index 96d16a5..6df5c44 100644 --- a/lubuntu/modules/unpackfs.conf +++ b/lubuntu/modules/unpackfs.conf @@ -1,5 +1,9 @@ ---- unpack: - - source: "/cdrom/casper/filesystem.squashfs" + - source: "/cdrom/casper/minimal.squashfs" sourcefs: "squashfs" destination: "" + condition: true + - source: "/cdrom/casper/minimal.standard.squashfs" + sourcefs: "squashfs" + destination: "" + condition: "installation_data.unpack_regular"