[partition] merge with upstream master branch

This commit is contained in:
Philip 2018-01-14 15:54:23 -05:00
parent 666ea16303
commit 2e07c28db0
77 changed files with 214 additions and 176 deletions

View File

@ -5,14 +5,19 @@ include(GenerateExportHeader)
find_package( Qt5 REQUIRED DBus ) find_package( Qt5 REQUIRED DBus )
find_package( KF5 REQUIRED Config CoreAddons I18n WidgetsAddons ) find_package( KF5 REQUIRED Config CoreAddons I18n WidgetsAddons )
find_package( KPMcore 3.3 REQUIRED ) find_package( KPMcore 3.3 )
set_package_properties(
KPMcore PROPERTIES
PURPOSE "For partitioning module"
)
include_directories( ${KPMCORE_INCLUDE_DIR} ) if ( KPMcore_FOUND )
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) include_directories( ${KPMCORE_INCLUDE_DIR} )
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
add_subdirectory( tests ) add_subdirectory( tests )
calamares_add_plugin( partition calamares_add_plugin( partition
TYPE viewmodule TYPE viewmodule
EXPORT_MACRO PLUGINDLLEXPORT_PRO EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES SOURCES
@ -65,4 +70,7 @@ calamares_add_plugin( partition
calamaresui calamaresui
KF5::CoreAddons KF5::CoreAddons
SHARED_LIB SHARED_LIB
) )
else()
calamares_skip_module( "partition (missing suitable KPMcore)" )
endif()

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * Copyright 2017, Adriaan de Groot <groot@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * Copyright 2014, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * Copyright 2017, Adriaan de Groot <groot@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
* *
@ -340,4 +340,26 @@ isEfiSystem()
return QDir( "/sys/firmware/efi/efivars" ).exists(); return QDir( "/sys/firmware/efi/efivars" ).exists();
} }
bool
isEfiBootable( const Partition* candidate )
{
/* If bit 17 is set, old-style Esp flag, it's OK */
if ( candidate->activeFlags().testFlag( PartitionTable::FlagEsp ) )
return true;
/* Otherwise, if it's a GPT table, Boot (bit 0) is the same as Esp */
const PartitionNode* root = candidate;
while ( root && !root->isRoot() )
root = root->parent();
// Strange case: no root found, no partition table node?
if ( !root )
return false;
const PartitionTable* table = dynamic_cast<const PartitionTable*>( root );
return table && ( table->type() == PartitionTable::TableType::gpt ) &&
candidate->activeFlags().testFlag( PartitionTable::FlagBoot );
}
} // nmamespace PartUtils } // nmamespace PartUtils

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
* *
@ -67,6 +67,11 @@ OsproberEntryList runOsprober( PartitionCoreModule* core );
*/ */
bool isEfiSystem(); bool isEfiSystem();
/**
* @brief Is the given @p partition bootable in EFI? Depending on
* the partition table layout, this may mean different flags.
*/
bool isEfiBootable( const Partition* candidate );
} }
#endif // PARTUTILS_H #endif // PARTUTILS_H

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * Copyright 2017, Adriaan de Groot <groot@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
@ -403,9 +403,8 @@ PartitionCoreModule::jobs() const
foreach ( auto job, lst ) foreach ( auto job, lst )
jobsDebug.append( job->prettyName() ); jobsDebug.append( job->prettyName() );
cDebug() << "PartitionCodeModule has been asked for jobs. About to return:"; cDebug() << "PartitionCodeModule has been asked for jobs. About to return:"
for ( const auto item: jobsDebug ) << jobsDebug.join( "\n" );
cDebug() << " .." << item;
return lst; return lst;
} }
@ -428,9 +427,9 @@ PartitionCoreModule::dumpQueue() const
cDebug() << "# Queue:"; cDebug() << "# Queue:";
for ( auto info : m_deviceInfos ) for ( auto info : m_deviceInfos )
{ {
cDebug() << " .. Device:" << info->device->name(); cDebug() << "## Device:" << info->device->name();
for ( auto job : info->jobs ) for ( auto job : info->jobs )
cDebug() << " .." << job->prettyName(); cDebug() << "-" << job->prettyName();
} }
} }
@ -505,16 +504,7 @@ PartitionCoreModule::scanForEfiSystemPartitions()
} }
QList< Partition* > efiSystemPartitions = QList< Partition* > efiSystemPartitions =
KPMHelpers::findPartitions( devices, KPMHelpers::findPartitions( devices, PartUtils::isEfiBootable );
[]( Partition* partition ) -> bool
{
if ( partition->activeFlags().testFlag( PartitionTable::FlagEsp ) )
{
cDebug() << "Found EFI system partition at" << partition->partitionPath();
return true;
}
return false;
} );
if ( efiSystemPartitions.isEmpty() ) if ( efiSystemPartitions.isEmpty() )
cDebug() << "WARNING: system is EFI but no EFI system partitions found."; cDebug() << "WARNING: system is EFI but no EFI system partitions found.";

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * Copyright 2017, Adriaan de Groot <groot@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * Copyright 2017, Adriaan de Groot <groot@kde.org>
@ -300,6 +300,16 @@ ChoicePage::selectedDevice()
} }
void
ChoicePage::hideButtons()
{
m_eraseButton->hide();
m_replaceButton->hide();
m_alongsideButton->hide();
m_somethingElseButton->hide();
}
/** /**
* @brief ChoicePage::applyDeviceChoice handler for the selected event of the device * @brief ChoicePage::applyDeviceChoice handler for the selected event of the device
* picker. Calls ChoicePage::selectedDevice() to get the current Device*, then * picker. Calls ChoicePage::selectedDevice() to get the current Device*, then
@ -311,7 +321,10 @@ void
ChoicePage::applyDeviceChoice() ChoicePage::applyDeviceChoice()
{ {
if ( !selectedDevice() ) if ( !selectedDevice() )
{
hideButtons();
return; return;
}
if ( m_core->isDirty() ) if ( m_core->isDirty() )
{ {
@ -342,11 +355,14 @@ ChoicePage::continueApplyDeviceChoice()
// applyDeviceChoice() will be called again momentarily as soon as we handle the // applyDeviceChoice() will be called again momentarily as soon as we handle the
// PartitionCoreModule::reverted signal. // PartitionCoreModule::reverted signal.
if ( !currd ) if ( !currd )
{
hideButtons();
return; return;
}
updateDeviceStatePreview(); updateDeviceStatePreview();
// Preview setup done. Now we show/hide choices as needed.
// Preview setup done. Now we show/hide choices as needed.
setupActions(); setupActions();
m_lastSelectedDeviceIndex = m_drivesCombo->currentIndex(); m_lastSelectedDeviceIndex = m_drivesCombo->currentIndex();
@ -562,7 +578,11 @@ ChoicePage::onLeave()
{ {
if ( m_bootloaderComboBox.isNull() ) if ( m_bootloaderComboBox.isNull() )
{ {
m_core->setBootLoaderInstallPath( selectedDevice()->deviceNode() ); auto d_p = selectedDevice();
if ( d_p )
m_core->setBootLoaderInstallPath( d_p->deviceNode() );
else
cDebug() << "WARNING: No device selected for bootloader.";
} }
else else
{ {
@ -1156,6 +1176,9 @@ ChoicePage::setupActions()
else else
m_deviceInfoWidget->setPartitionTableType( PartitionTable::unknownTableType ); m_deviceInfoWidget->setPartitionTableType( PartitionTable::unknownTableType );
// Manual partitioning is always a possibility
m_somethingElseButton->show();
bool atLeastOneCanBeResized = false; bool atLeastOneCanBeResized = false;
bool atLeastOneCanBeReplaced = false; bool atLeastOneCanBeReplaced = false;
bool atLeastOneIsMounted = false; // Suppress 'erase' if so bool atLeastOneIsMounted = false; // Suppress 'erase' if so
@ -1332,18 +1355,16 @@ ChoicePage::updateNextEnabled()
{ {
bool enabled = false; bool enabled = false;
auto sm_p = m_beforePartitionBarsView ? m_beforePartitionBarsView->selectionModel() : nullptr;
switch ( m_choice ) switch ( m_choice )
{ {
case NoChoice: case NoChoice:
enabled = false; enabled = false;
break; break;
case Replace: case Replace:
enabled = m_beforePartitionBarsView->selectionModel()->
currentIndex().isValid();
break;
case Alongside: case Alongside:
enabled = m_beforePartitionBarsView->selectionModel()-> enabled = sm_p && sm_p->currentIndex().isValid();
currentIndex().isValid();
break; break;
case Erase: case Erase:
case Manual: case Manual:

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
* *
@ -113,8 +113,12 @@ private:
void setupChoices(); void setupChoices();
QComboBox* createBootloaderComboBox( QWidget* parentButton ); QComboBox* createBootloaderComboBox( QWidget* parentButton );
Device* selectedDevice(); Device* selectedDevice();
void applyDeviceChoice();
void continueApplyDeviceChoice(); /* Change the UI depending on the device selected. */
void hideButtons(); // Hide everything when no device
void applyDeviceChoice(); // Start scanning new device
void continueApplyDeviceChoice(); // .. called after scan
void updateDeviceStatePreview(); void updateDeviceStatePreview();
void updateActionChoicePreview( ChoicePage::Choice choice ); void updateActionChoicePreview( ChoicePage::Choice choice );
void setupActions(); void setupActions();

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2014-2017, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2017, Teo Mrnjavac <teo@kde.org>
@ -408,7 +408,7 @@ PartitionViewStep::onLeave()
.arg( *Calamares::Branding::ShortProductName ) .arg( *Calamares::Branding::ShortProductName )
.arg( espMountPoint ); .arg( espMountPoint );
} }
else if ( esp && !esp->activeFlags().testFlag( PartitionTable::FlagEsp ) ) else if ( esp && !PartUtils::isEfiBootable( esp ) )
{ {
message = tr( "EFI system partition flag not set" ); message = tr( "EFI system partition flag not set" );
description = tr( "An EFI system partition is necessary to start %1." description = tr( "An EFI system partition is necessary to start %1."

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * Copyright 2014, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * Copyright 2014, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * Copyright 2017, Adriaan de Groot <groot@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>
@ -73,33 +73,21 @@ CreatePartitionTableJob::exec()
PartitionTable* table = m_device->partitionTable(); PartitionTable* table = m_device->partitionTable();
cDebug() << "Creating new partition table of type" << table->typeName() cDebug() << "Creating new partition table of type" << table->typeName()
<< " - Uncommitted yet: " << table; << ", uncommitted yet:\n" << table;
QProcess lsblk; QProcess lsblk;
lsblk.setProgram( "lsblk" ); lsblk.setProgram( "lsblk" );
lsblk.setProcessChannelMode( QProcess::MergedChannels ); lsblk.setProcessChannelMode( QProcess::MergedChannels );
lsblk.start(); lsblk.start();
lsblk.waitForFinished(); lsblk.waitForFinished();
cDebug() << "lsblk:\n" << lsblk.readAllStandardOutput();
QByteArray byte = lsblk.readAllStandardOutput();
QStringList lines = QString(byte).split(("\n"),QString::SkipEmptyParts);
cDebug() << "CreatePartitionTableJob asked for lsblk output:";
for (const auto line: lines)
cDebug() << " .." << line;
QProcess mount; QProcess mount;
mount.setProgram( "mount" ); mount.setProgram( "mount" );
mount.setProcessChannelMode( QProcess::MergedChannels ); mount.setProcessChannelMode( QProcess::MergedChannels );
mount.start(); mount.start();
mount.waitForFinished(); mount.waitForFinished();
cDebug() << "mount:\n" << mount.readAllStandardOutput();
QByteArray mbyte = mount.readAllStandardOutput();
QStringList mlines = QString(mbyte).split(("\n"),QString::SkipEmptyParts);
cDebug() << "CreatePartitionTableJob asked for mount output:";
for (const auto mline: mlines)
cDebug() << " .." << mline;
CreatePartitionTableOperation op(*m_device, table); CreatePartitionTableOperation op(*m_device, table);
op.setStatus(Operation::StatusRunning); op.setStatus(Operation::StatusRunning);

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org> * Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * Copyright 2015, Teo Mrnjavac <teo@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * Copyright 2016, Teo Mrnjavac <teo@kde.org>
* *

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * Copyright 2017, Adriaan de Groot <groot@kde.org>

View File

@ -1,4 +1,4 @@
/* === This file is part of Calamares - <http://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Aurélien Gâteau <agateau@kde.org> * Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* *