|
|
@ -47,7 +47,7 @@ CreatePartitionJob::prettyName()
|
|
|
|
return tr( "Create partition" ); // FIXME
|
|
|
|
return tr( "Create partition" ); // FIXME
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
Calamares::JobResult
|
|
|
|
CreatePartitionJob::exec()
|
|
|
|
CreatePartitionJob::exec()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Report report( 0 );
|
|
|
|
Report report( 0 );
|
|
|
@ -62,33 +62,37 @@ CreatePartitionJob::exec()
|
|
|
|
QString partitionPath = backendPartitionTable->createPartition( report, *m_partition );
|
|
|
|
QString partitionPath = backendPartitionTable->createPartition( report, *m_partition );
|
|
|
|
if ( partitionPath.isEmpty() )
|
|
|
|
if ( partitionPath.isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cLog( LOGINFO ) << "Failed to create partition";
|
|
|
|
return Calamares::JobResult::error(
|
|
|
|
cLog( LOGINFO ) << report.toText();
|
|
|
|
tr( "Failed to create partition" ),
|
|
|
|
return;
|
|
|
|
report.toText()
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
backendPartitionTable->commit();
|
|
|
|
backendPartitionTable->commit();
|
|
|
|
|
|
|
|
|
|
|
|
FileSystem& fs = m_partition->fileSystem();
|
|
|
|
FileSystem& fs = m_partition->fileSystem();
|
|
|
|
if ( fs.type() == FileSystem::Unformatted )
|
|
|
|
if ( fs.type() == FileSystem::Unformatted )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return Calamares::JobResult::ok();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( !fs.create( report, partitionPath ) )
|
|
|
|
if ( !fs.create( report, partitionPath ) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cLog( LOGINFO ) << "Failed to create filesystem";
|
|
|
|
return Calamares::JobResult::error(
|
|
|
|
cLog( LOGINFO ) << report.toText();
|
|
|
|
tr( "Failed to create system" ),
|
|
|
|
return;
|
|
|
|
report.toText()
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( !backendPartitionTable->setPartitionSystemType( report, *m_partition ) )
|
|
|
|
if ( !backendPartitionTable->setPartitionSystemType( report, *m_partition ) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cLog( LOGINFO ) << "Failed to update partition table";
|
|
|
|
return Calamares::JobResult::error(
|
|
|
|
cLog( LOGINFO ) << report.toText();
|
|
|
|
tr( "Failed to update partition table" ),
|
|
|
|
return;
|
|
|
|
report.toText()
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
backendPartitionTable->commit();
|
|
|
|
backendPartitionTable->commit();
|
|
|
|
|
|
|
|
return Calamares::JobResult::ok();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|