Netinstall: fix datatype passed to packages module
- Each element of the (list) packageOperations needs to be a package operation, which is a dictionary with keys (identifying actions) and lists of packages (which may be strings or script-info dictionaries).
This commit is contained in:
parent
aabcd6ba86
commit
4314f2c4ad
@ -126,10 +126,11 @@ NetInstallViewStep::onLeave()
|
||||
cDebug() << "Leaving netinstall, adding packages to be installed"
|
||||
<< "to global storage";
|
||||
|
||||
QMap<QString, QVariant> packagesWithOperation;
|
||||
QList<PackageTreeItem::ItemData> packages = m_widget->selectedPackages();
|
||||
QVariantList installPackages;
|
||||
QVariantList tryInstallPackages;
|
||||
QVariantList packageOperations;
|
||||
|
||||
cDebug() << "Processing";
|
||||
|
||||
for ( auto package : packages )
|
||||
@ -145,14 +146,22 @@ NetInstallViewStep::onLeave()
|
||||
}
|
||||
|
||||
if ( !installPackages.empty() )
|
||||
packagesWithOperation.insert( "install", QVariant( installPackages ) );
|
||||
{
|
||||
QMap<QString, QVariant> op;
|
||||
op.insert( "install", QVariant( installPackages ) );
|
||||
packageOperations.append(op);
|
||||
}
|
||||
if ( !tryInstallPackages.empty() )
|
||||
packagesWithOperation.insert( "try_install", QVariant( tryInstallPackages ) );
|
||||
{
|
||||
QMap<QString, QVariant> 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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user