Compare commits

...

2 Commits

Author SHA1 Message Date
Teo Mrnjavac
07b6b1265b Better error reporting. 2015-09-29 15:54:11 +02:00
Teo Mrnjavac
973f6935e4 Make sure alongside is unavailable if no partitions can be created. 2015-09-29 15:53:39 +02:00
2 changed files with 6 additions and 2 deletions

View File

@@ -144,8 +144,11 @@ AlongsidePage::init( PartitionCoreModule* core , const OsproberEntryList& osprob
}
// End MBR primary limit check.
cDebug() << "Devices with limit reached:" << pathsOfDevicesWithPrimariesLimitReached;
cDebug() << "Osprober entries:";
foreach ( const OsproberEntry& e, osproberEntries )
{
cDebug() << " *" << e.path << e.line;
// TODO 2.0: move this to a Utils namespace.
bool cantCreatePartitions = false;
foreach ( const QString& devicePath, pathsOfDevicesWithPrimariesLimitReached )

View File

@@ -130,6 +130,7 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
pathsOfDevicesWithPrimariesLimitReached.append( dev->deviceNode() );
}
}
cDebug() << "Devices with limit reached:" << pathsOfDevicesWithPrimariesLimitReached;
if ( osproberEntries.count() == 0 )
{
@@ -271,7 +272,7 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
break;
}
}
if ( !cantCreatePartitions )
if ( entry.canBeResized && !cantCreatePartitions )
{
atLeastOneCanCreatePartitions = true;
break;
@@ -309,7 +310,7 @@ ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEn
string( Calamares::Branding::ShortVersionedName ) ) );
)
if ( !atLeastOneCanBeResized )
if ( !( atLeastOneCanBeResized && atLeastOneCanCreatePartitions ) )
alongsideButton->hide();
}