|
|
@ -4,6 +4,7 @@
|
|
|
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
|
|
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
|
|
|
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
|
|
|
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
|
|
|
* Copyright 2018, Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
* Copyright 2018, Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
|
|
|
|
* Copyright 2018, Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Calamares is free software: you can redistribute it and/or modify
|
|
|
|
* Calamares is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
@ -47,6 +48,9 @@
|
|
|
|
// KPMcore
|
|
|
|
// KPMcore
|
|
|
|
#include <kpmcore/core/device.h>
|
|
|
|
#include <kpmcore/core/device.h>
|
|
|
|
#include <kpmcore/core/partition.h>
|
|
|
|
#include <kpmcore/core/partition.h>
|
|
|
|
|
|
|
|
#ifdef WITH_KPMCOREGT33
|
|
|
|
|
|
|
|
#include <kpmcore/core/softwareraid.h>
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#include <kpmcore/ops/deactivatevolumegroupoperation.h>
|
|
|
|
#include <kpmcore/ops/deactivatevolumegroupoperation.h>
|
|
|
|
#include <kpmcore/ops/removevolumegroupoperation.h>
|
|
|
|
#include <kpmcore/ops/removevolumegroupoperation.h>
|
|
|
|
|
|
|
|
|
|
|
@ -146,6 +150,7 @@ PartitionPage::updateButtons()
|
|
|
|
bool isInVG = m_core->isInVG( partition );
|
|
|
|
bool isInVG = m_core->isInVG( partition );
|
|
|
|
|
|
|
|
|
|
|
|
create = isFree;
|
|
|
|
create = isFree;
|
|
|
|
|
|
|
|
|
|
|
|
// Keep it simple for now: do not support editing extended partitions as
|
|
|
|
// Keep it simple for now: do not support editing extended partitions as
|
|
|
|
// it does not work with our current edit implementation which is
|
|
|
|
// it does not work with our current edit implementation which is
|
|
|
|
// actually remove + add. This would not work with extended partitions
|
|
|
|
// actually remove + add. This would not work with extended partitions
|
|
|
@ -160,8 +165,20 @@ PartitionPage::updateButtons()
|
|
|
|
if ( m_ui->deviceComboBox->currentIndex() >= 0 )
|
|
|
|
if ( m_ui->deviceComboBox->currentIndex() >= 0 )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QModelIndex deviceIndex = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 );
|
|
|
|
QModelIndex deviceIndex = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 );
|
|
|
|
if ( m_core->deviceModel()->deviceForIndex( deviceIndex )->type() != Device::Type::LVM_Device )
|
|
|
|
auto device = m_core->deviceModel()->deviceForIndex( deviceIndex );
|
|
|
|
|
|
|
|
if ( device->type() != Device::Type::LVM_Device )
|
|
|
|
|
|
|
|
{
|
|
|
|
createTable = true;
|
|
|
|
createTable = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_KPMCOREGT33
|
|
|
|
|
|
|
|
if ( device->type() == Device::Type::SoftwareRAID_Device &&
|
|
|
|
|
|
|
|
static_cast< SoftwareRAID* >(device)->status() == SoftwareRAID::Status::Inactive )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
createTable = false;
|
|
|
|
|
|
|
|
create = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
currentDeviceIsVG = true;
|
|
|
|
currentDeviceIsVG = true;
|
|
|
|