[partition] kpmcore latest release doesn't support FileSystem::Type::Luks2

This commit is contained in:
Caio Carvalho 2018-06-14 15:37:00 -03:00
parent 3b6c764f75
commit 98a158c6e5
2 changed files with 15 additions and 1 deletions

View File

@ -12,6 +12,10 @@ set_package_properties(
)
if ( KPMcore_FOUND )
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
add_definitions(-DWITH_KPMCOREGT33) # kpmcore greater than 3.3
endif()
include_directories( ${KPMCORE_INCLUDE_DIR} )
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )

View File

@ -618,7 +618,7 @@ PartitionCoreModule::scanForLVMPVs()
if ( p->fileSystem().type() == FileSystem::Type::Lvm2_PV )
m_lvmPVs << p;
else if ( p->fileSystem().type() == FileSystem::Type::Luks || p->fileSystem().type() == FileSystem::Type::Luks2 )
else if ( p->fileSystem().type() == FileSystem::Type::Luks )
{
// Encrypted LVM PVs
FileSystem* innerFS = static_cast<const FS::luks*>(&p->fileSystem())->innerFS();
@ -626,6 +626,16 @@ PartitionCoreModule::scanForLVMPVs()
if ( innerFS && innerFS->type() == FileSystem::Type::Lvm2_PV )
m_lvmPVs << p;
}
#ifdef WITH_KPMCOREGT33
else if ( p->fileSystem().type() == FileSystem::Type::Luks2 )
{
// Encrypted LVM PVs
FileSystem* innerFS = static_cast<const FS::luks*>(&p->fileSystem())->innerFS();
if ( innerFS && innerFS->type() == FileSystem::Type::Lvm2_PV )
m_lvmPVs << p;
}
#endif
}
}
}