diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 58fa17674..f94a48829 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -69,6 +69,7 @@ PartitionViewStep::PartitionViewStep( QObject* parent ) , m_widget( new QStackedWidget() ) , m_choicePage( nullptr ) , m_manualPartitionPage( nullptr ) + , m_requiredStorageGiB( 0.0 ) { m_widget->setContentsMargins( 0, 0, 0, 0 ); @@ -564,6 +565,9 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) m_swapChoices = choices; + // Settings that overlap with the Welcome module + m_requiredStorageGiB = CalamaresUtils::getDouble( configurationMap, "requiredStorage", -1.0 ); + // These gs settings seem to be unused (in upstream Calamares) outside of // the partition module itself. gs->insert( "ensureSuspendToDisk", ensureSuspendToDisk ); diff --git a/src/modules/partition/gui/PartitionViewStep.h b/src/modules/partition/gui/PartitionViewStep.h index e3d058e67..0a62b3aa3 100644 --- a/src/modules/partition/gui/PartitionViewStep.h +++ b/src/modules/partition/gui/PartitionViewStep.h @@ -86,6 +86,8 @@ private: QFutureWatcher* m_future; QSet< PartitionActions::Choices::SwapChoice > m_swapChoices; + + qreal m_requiredStorageGiB; // May duplicate setting in the welcome module }; CALAMARES_PLUGIN_FACTORY_DECLARATION( PartitionViewStepFactory ) diff --git a/src/modules/partition/partition.conf b/src/modules/partition/partition.conf index 42d1f2ce2..385269fc7 100644 --- a/src/modules/partition/partition.conf +++ b/src/modules/partition/partition.conf @@ -120,3 +120,15 @@ defaultFileSystemType: "ext4" # % of the available drive space if a '%' is appended to the value # - minSize: minimum partition size (optional parameter) # - maxSize: maximum partition size (optional parameter) + +# Checking for available storage +# +# This overlaps with the setting of the same name in the welcome module's +# requirements section. If nothing is set by the welcome module, this +# value is used instead. It is still a problem if there is no required +# size set at all, and the replace and resize options will not be offered +# if no required size is set. +# +# The value is in Gibibytes (GiB). +# +# requiredStorage: 3.5