|
|
@ -1,6 +1,7 @@
|
|
|
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
|
|
|
/* === This file is part of Calamares - <http://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>
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* 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
|
|
|
@ -23,6 +24,7 @@
|
|
|
|
#include <core/PartitionInfo.h>
|
|
|
|
#include <core/PartitionInfo.h>
|
|
|
|
#include <core/PartitionIterator.h>
|
|
|
|
#include <core/PartitionIterator.h>
|
|
|
|
#include <core/PMUtils.h>
|
|
|
|
#include <core/PMUtils.h>
|
|
|
|
|
|
|
|
#include "Branding.h"
|
|
|
|
|
|
|
|
|
|
|
|
// CalaPM
|
|
|
|
// CalaPM
|
|
|
|
#include <core/device.h>
|
|
|
|
#include <core/device.h>
|
|
|
@ -75,6 +77,63 @@ FillGlobalStorageJob::prettyName() const
|
|
|
|
return tr( "Set partition information" );
|
|
|
|
return tr( "Set partition information" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString
|
|
|
|
|
|
|
|
FillGlobalStorageJob::prettyDescription() const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QStringList lines;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ( QVariant partitionItem, createPartitionList().toList() )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ( partitionItem.type() == QVariant::Map )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QVariantMap partitionMap = partitionItem.toMap();
|
|
|
|
|
|
|
|
QString path = partitionMap.value( "device" ).toString();
|
|
|
|
|
|
|
|
QString mountPoint = partitionMap.value( "mountPoint" ).toString();
|
|
|
|
|
|
|
|
QString fsType = partitionMap.value( "fs" ).toString();
|
|
|
|
|
|
|
|
qDebug() << partitionMap.value( "uuid" ) << path << mountPoint << fsType;
|
|
|
|
|
|
|
|
if ( mountPoint.isEmpty() || fsType.isEmpty() )
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if ( path.isEmpty() )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ( mountPoint == "/" )
|
|
|
|
|
|
|
|
lines.append( tr( "Install %1 on <strong>new</strong> %2 system partition." )
|
|
|
|
|
|
|
|
.arg( Calamares::Branding::instance()->string(
|
|
|
|
|
|
|
|
Calamares::Branding::ShortProductName ) )
|
|
|
|
|
|
|
|
.arg( fsType ) );
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
lines.append( tr( "Set up <strong>new</strong> %2 partition with mount point "
|
|
|
|
|
|
|
|
"<strong>%1</strong>." )
|
|
|
|
|
|
|
|
.arg( mountPoint )
|
|
|
|
|
|
|
|
.arg( fsType ) );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ( mountPoint == "/" )
|
|
|
|
|
|
|
|
lines.append( tr( "Install %2 on %3 system partition <strong>%1</strong>." )
|
|
|
|
|
|
|
|
.arg( path )
|
|
|
|
|
|
|
|
.arg( Calamares::Branding::instance()->string(
|
|
|
|
|
|
|
|
Calamares::Branding::ShortProductName ) )
|
|
|
|
|
|
|
|
.arg( fsType ) );
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
lines.append( tr( "Set up %3 partition <strong>%1</strong> with mount point "
|
|
|
|
|
|
|
|
"<strong>%2</strong>." )
|
|
|
|
|
|
|
|
.arg( path )
|
|
|
|
|
|
|
|
.arg( mountPoint )
|
|
|
|
|
|
|
|
.arg( fsType ) );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QVariant bootloaderMap = createBootLoaderMap();
|
|
|
|
|
|
|
|
if ( !m_bootLoaderPath.isEmpty() )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
lines.append( tr( "Install boot loader on <strong>%1</strong>." )
|
|
|
|
|
|
|
|
.arg( m_bootLoaderPath ) );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return lines.join( "<br/>" );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Calamares::JobResult
|
|
|
|
Calamares::JobResult
|
|
|
|
FillGlobalStorageJob::exec()
|
|
|
|
FillGlobalStorageJob::exec()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -88,7 +147,7 @@ FillGlobalStorageJob::exec()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QVariant
|
|
|
|
QVariant
|
|
|
|
FillGlobalStorageJob::createPartitionList()
|
|
|
|
FillGlobalStorageJob::createPartitionList() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
UuidForPartitionHash hash = findPartitionUuids();
|
|
|
|
UuidForPartitionHash hash = findPartitionUuids();
|
|
|
|
QVariantList lst;
|
|
|
|
QVariantList lst;
|
|
|
@ -99,7 +158,7 @@ FillGlobalStorageJob::createPartitionList()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QVariant
|
|
|
|
QVariant
|
|
|
|
FillGlobalStorageJob::createBootLoaderMap()
|
|
|
|
FillGlobalStorageJob::createBootLoaderMap() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QVariantMap map;
|
|
|
|
QVariantMap map;
|
|
|
|
QString path = m_bootLoaderPath;
|
|
|
|
QString path = m_bootLoaderPath;
|
|
|
|