Merge remote-tracking branch 'origin/master' into calamares

Pick up some older MRs that apply to the older branch.
This commit is contained in:
Adriaan de Groot 2020-06-16 16:45:49 +02:00
commit e3b8570d61
6 changed files with 14 additions and 0 deletions

1
.gitignore vendored
View File

@ -50,3 +50,4 @@ CMakeLists.txt.user
# Kate
*.kate-swp
tags

View File

@ -883,6 +883,7 @@ PartitionCoreModule::initLayout( const QVariantList& config )
}
if ( !m_partLayout->addEntry( CalamaresUtils::getString( pentry, "name" ),
CalamaresUtils::getString( pentry, "uuid" ),
CalamaresUtils::getString( pentry, "type" ),
CalamaresUtils::getUnsignedInteger( pentry, "attributes", 0 ),
CalamaresUtils::getString( pentry, "mountPoint" ),

View File

@ -118,6 +118,7 @@ PartitionLayout::addEntry( const QString& mountPoint, const QString& size, const
bool
PartitionLayout::addEntry( const QString& label,
const QString& uuid,
const QString& type,
quint64 attributes,
const QString& mountPoint,
@ -141,6 +142,7 @@ PartitionLayout::addEntry( const QString& label,
}
entry.partLabel = label;
entry.partUUID = uuid;
entry.partType = type;
entry.partAttributes = attributes;
entry.partMountPoint = mountPoint;
@ -246,6 +248,10 @@ PartitionLayout::execute( Device* dev,
currentPartition->setLabel( part.partLabel );
currentPartition->fileSystem().setLabel( part.partLabel );
}
if ( !part.partUUID.isEmpty() )
{
currentPartition->setUUID( part.partUUID );
}
if ( !part.partType.isEmpty() )
{
#if defined( WITH_KPMCORE42API )

View File

@ -41,6 +41,7 @@ public:
struct PartitionEntry
{
QString partLabel;
QString partUUID;
QString partType;
quint64 partAttributes;
QString partMountPoint;
@ -77,6 +78,7 @@ public:
const QString& min = QString(),
const QString& max = QString() );
bool addEntry( const QString& label,
const QString& uuid,
const QString& type,
quint64 attributes,
const QString& mountPoint,

View File

@ -91,6 +91,8 @@ mapForPartition( Partition* partition, const QString& uuid )
{
QVariantMap map;
map[ "device" ] = partition->partitionPath();
map[ "partlabel" ] = partition->label();
map[ "partuuid" ] = partition->uuid();
map[ "mountPoint" ] = PartitionInfo::mountPoint( partition );
map[ "fsName" ] = userVisibleFS( partition->fileSystem() );
map[ "fs" ] = untranslatedFS( partition->fileSystem() );
@ -107,6 +109,7 @@ mapForPartition( Partition* partition, const QString& uuid )
Logger::CDebug deb;
using TR = Logger::DebugRow< const char* const, const QString& >;
deb << Logger::SubEntry << "mapping for" << partition->partitionPath() << partition->deviceNode()
<< TR( "partlabel", map[ "partlabel" ].toString() ) << TR( "partuuid", map[ "partuuid" ].toString() )
<< TR( "mountPoint:", PartitionInfo::mountPoint( partition ) ) << TR( "fs:", map[ "fs" ].toString() )
<< TR( "fsName", map[ "fsName" ].toString() ) << TR( "uuid", uuid )
<< TR( "claimed", map[ "claimed" ].toString() );

View File

@ -128,6 +128,7 @@ defaultFileSystemType: "ext4"
# - name: filesystem label
# and
# partition name (gpt only; since KPMCore 4.2.0)
# - uuid: partition uuid (optional parameter; gpt only; requires KPMCore >= 4.2.0)
# - type: partition type (optional parameter; gpt only; requires KPMCore >= 4.2.0)
# - attributes: partition attributes (optional parameter; gpt only; requires KPMCore >= 4.2.0)
# - filesystem: filesystem type