diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bd052c2e..bf46b4900 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,7 +166,7 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX ### Bump version here set( CALAMARES_VERSION_MAJOR 3 ) set( CALAMARES_VERSION_MINOR 1 ) -set( CALAMARES_VERSION_PATCH 5 ) +set( CALAMARES_VERSION_PATCH 6 ) set( CALAMARES_VERSION_RC 0 ) set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} ) diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index c714418df..63f1bb6f6 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -126,18 +126,26 @@ NetInstallViewStep::onLeave() cDebug() << "Leaving netinstall, adding packages to be installed" << "to global storage"; - QMap packagesWithOperation; QList packages = m_widget->selectedPackages(); QVariantList installPackages; QVariantList tryInstallPackages; + QVariantList packageOperations; + cDebug() << "Processing"; for ( auto package : packages ) { - QMap details; - details.insert( "pre-script", package.preScript ); - details.insert( "package", package.packageName ); - details.insert( "post-script", package.postScript ); + QVariant details( package.packageName ); + // If it's a package with a pre- or post-script, replace + // with the more complicated datastructure. + if (!package.preScript.isEmpty() || !package.postScript.isEmpty()) + { + QMap sdetails; + sdetails.insert( "pre-script", package.preScript ); + sdetails.insert( "package", package.packageName ); + sdetails.insert( "post-script", package.postScript ); + details = sdetails; + } if ( package.isCritical ) installPackages.append( details ); else @@ -145,14 +153,22 @@ NetInstallViewStep::onLeave() } if ( !installPackages.empty() ) - packagesWithOperation.insert( "install", QVariant( installPackages ) ); + { + QMap op; + op.insert( "install", QVariant( installPackages ) ); + packageOperations.append(op); + } if ( !tryInstallPackages.empty() ) - packagesWithOperation.insert( "try_install", QVariant( tryInstallPackages ) ); + { + QMap op; + op.insert( "try_install", QVariant( tryInstallPackages ) ); + packageOperations.append(op); + } - if ( !packagesWithOperation.isEmpty() ) + if ( !packageOperations.isEmpty() ) { Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - gs->insert( "packageOperations", QVariant( packagesWithOperation ) ); + gs->insert( "packageOperations", QVariant( packageOperations ) ); } }