diff --git a/src/modules/partition/jobs/ClearMountsJob.cpp b/src/modules/partition/jobs/ClearMountsJob.cpp index fd0375ca4..cde4519a4 100644 --- a/src/modules/partition/jobs/ClearMountsJob.cpp +++ b/src/modules/partition/jobs/ClearMountsJob.cpp @@ -367,23 +367,17 @@ ClearMountsJob::prettyStatusMessage() const Calamares::JobResult ClearMountsJob::exec() { - CalamaresUtils::Partition::Syncer s; - const QString deviceName = m_deviceNode.split( '/' ).last(); - + CalamaresUtils::Partition::Syncer s; QList< MessageAndPath > goodNews; - QProcess process; - - const QStringList partitionsList = getPartitionsForDevice( deviceName ); - const QStringList swapPartitions = getSwapsForDevice( m_deviceNode ); apply( getCryptoDevices(), tryCryptoClose, goodNews ); apply( getLVMVolumes(), tryUmount, goodNews ); apply( getPVGroups( deviceName ), tryVGDisable, goodNews ); apply( getCryptoDevices(), tryCryptoClose, goodNews ); - apply( partitionsList, tryUmount, goodNews ); - apply( swapPartitions, tryClearSwap, goodNews ); + apply( getPartitionsForDevice( deviceName ), tryUmount, goodNews ); + apply( getSwapsForDevice( m_deviceNode ), tryClearSwap, goodNews ); Calamares::JobResult ok = Calamares::JobResult::ok(); ok.setMessage( tr( "Cleared all mounts for %1" ).arg( m_deviceNode ) ); diff --git a/src/modules/partition/jobs/ClearMountsJob.h b/src/modules/partition/jobs/ClearMountsJob.h index f0ef3e104..a49c07d3f 100644 --- a/src/modules/partition/jobs/ClearMountsJob.h +++ b/src/modules/partition/jobs/ClearMountsJob.h @@ -17,14 +17,21 @@ class Device; /** * This job tries to free all mounts for the given device, so partitioning * operations can proceed. + * + * - partitions on the device are unmounted + * - swap on the device is disabled and cleared + * - physical volumes for LVM on the device are disabled + * + * In addition, regardless of device: + * - all /dev/mapper entries (crypto / LUKS) are closed + * - all logical volumes for LVM are unmounted + * */ class ClearMountsJob : public Calamares::Job { Q_OBJECT public: /** @brief Creates a job freeing mounts on @p device - * - * All /dev/mapper entries are closed, regardless of device. * * No ownership is transferred; the @p device is used only to access * the device node (name).