From 62888f7984d82af360cd475042057eaeed360575 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 21 Feb 2022 11:56:34 +0100 Subject: [PATCH] [partition] Rename setting to BAIL_OUT - unsafe partitioning will bail out (and end the installation) if BAIL_OUT is set (previously _LAME). --- CMakeLists.txt | 2 +- src/modules/partition/CMakeLists.txt | 8 ++++---- src/modules/partition/core/DeviceList.cpp | 2 +- src/modules/partition/core/PartitionCoreModule.cpp | 4 ++-- src/modules/partition/gui/ChoicePage.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd46148d8..9d841d284 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,7 @@ option( BUILD_SCHEMA_TESTING "Enable schema-validation-tests" ON ) # - DEBUG_FILESYSTEMS does extra logging and checking when looking at # partition configuration. Lists known KPMCore FS types. # - DEBUG_PARTITION_UNSAFE (see partition/CMakeLists.txt) -# - DEBUG_PARTITION_LAME (see partition/CMakeLists.txt) +# - DEBUG_PARTITION_BAIL_OUT (see partition/CMakeLists.txt) ### USE_* diff --git a/src/modules/partition/CMakeLists.txt b/src/modules/partition/CMakeLists.txt index 96378d98d..2a2ddf188 100644 --- a/src/modules/partition/CMakeLists.txt +++ b/src/modules/partition/CMakeLists.txt @@ -9,10 +9,10 @@ # current disk). Set DEBUG_PARTITION_UNSAFE to allow that (it turns off # some filtering of devices). If you **do** allow unsafe partitioning, # it will error out at runtime unless you **also** switch **off** -# DEBUG_PARTITION_LAME, at which point you are welcome to shoot +# DEBUG_PARTITION_BAIL_OUT, at which point you are welcome to shoot # yourself in the foot. option( DEBUG_PARTITION_UNSAFE "Allow unsafe partitioning choices." OFF ) -option( DEBUG_PARTITION_LAME "Unsafe partitioning will error out on exec." ON ) +option( DEBUG_PARTITION_BAIL_OUT "Unsafe partitioning will error out on exec." ON ) # This is very chatty, useful mostly if you don't know what KPMCore offers. option( DEBUG_FILESYSTEMS "Log all available Filesystems from KPMCore." OFF ) @@ -21,8 +21,8 @@ include_directories( ${CMAKE_SOURCE_DIR} ) # For 3rdparty set( _partition_defs ) if( DEBUG_PARTITION_UNSAFE ) - if( DEBUG_PARTITION_LAME ) - list( APPEND _partition_defs DEBUG_PARTITION_LAME ) + if( DEBUG_PARTITION_BAIL_OUT ) + list( APPEND _partition_defs DEBUG_PARTITION_BAIL_OUT ) endif() list( APPEND _partition_defs DEBUG_PARTITION_UNSAFE ) endif() diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp index adbbddd68..b3a10dde7 100644 --- a/src/modules/partition/core/DeviceList.cpp +++ b/src/modules/partition/core/DeviceList.cpp @@ -143,7 +143,7 @@ getDevices( DeviceType which ) */ #ifdef DEBUG_PARTITION_UNSAFE cWarning() << "Allowing unsafe partitioning choices." << devices.count() << "candidates."; -#ifdef DEBUG_PARTITION_LAME +#ifdef DEBUG_PARTITION_BAIL_OUT cDebug() << Logger::SubEntry << "unsafe partitioning has been lamed, and will fail."; #endif diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index 989327ef0..367672c75 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -37,7 +37,7 @@ #include "jobs/ResizeVolumeGroupJob.h" #include "jobs/SetPartitionFlagsJob.h" -#ifdef DEBUG_PARTITION_LAME +#ifdef DEBUG_PARTITION_BAIL_OUT #include "JobExample.h" #endif #include "partition/PartitionIterator.h" @@ -622,7 +622,7 @@ PartitionCoreModule::jobs( const Config* config ) const QList< Device* > devices; #ifdef DEBUG_PARTITION_UNSAFE -#ifdef DEBUG_PARTITION_LAME +#ifdef DEBUG_PARTITION_BAIL_OUT cDebug() << "Unsafe partitioning is enabled."; cDebug() << Logger::SubEntry << "it has been lamed, and will fail."; lst << Calamares::job_ptr( new Calamares::FailJob( QStringLiteral( "Partition" ) ) ); diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 588c1b643..c0845da7f 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -1481,7 +1481,7 @@ ChoicePage::setupActions() } #ifdef DEBUG_PARTITION_UNSAFE -#ifdef DEBUG_PARTITION_LAME +#ifdef DEBUG_PARTITION_BAIL_OUT // If things can't be broken, allow all the buttons atLeastOneCanBeReplaced = true; atLeastOneCanBeResized = true;