[libcalamares] Build complete instanceDescriptor list
- there's no reason to ignore custom instances that are **not** mentioned in the *instances* section: it may be useful to name more that one even without distinct config files.
This commit is contained in:
parent
4968efdaa7
commit
57f5a92d96
@ -268,28 +268,18 @@ Settings::validateSequence()
|
||||
if ( !k.isValid() )
|
||||
{
|
||||
cWarning() << "Invalid instance key in *sequence*," << instance;
|
||||
continue;
|
||||
}
|
||||
if ( k.isValid() && k.isCustom() )
|
||||
|
||||
targetKey = k;
|
||||
const auto it = std::find_if( m_moduleInstances.constBegin(), m_moduleInstances.constEnd(), moduleFinder );
|
||||
if ( it == m_moduleInstances.constEnd() )
|
||||
{
|
||||
targetKey = k;
|
||||
const auto it
|
||||
= std::find_if( m_moduleInstances.constBegin(), m_moduleInstances.constEnd(), moduleFinder );
|
||||
if ( it == m_moduleInstances.constEnd() )
|
||||
if ( k.isCustom() )
|
||||
{
|
||||
cWarning() << "Custom instance key" << instance << "is not listed in the *instances*";
|
||||
// don't add it, let this fail later.
|
||||
}
|
||||
}
|
||||
if ( k.isValid() && !k.isCustom() )
|
||||
{
|
||||
targetKey = k;
|
||||
const auto it
|
||||
= std::find_if( m_moduleInstances.constBegin(), m_moduleInstances.constEnd(), moduleFinder );
|
||||
if ( it == m_moduleInstances.constEnd() )
|
||||
{
|
||||
// Non-custom instance, just mentioned in *sequence*
|
||||
m_moduleInstances.append( InstanceDescription( k ) );
|
||||
}
|
||||
m_moduleInstances.append( InstanceDescription( k ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,9 +101,23 @@ public:
|
||||
QStringList modulesSearchPaths() const;
|
||||
|
||||
using InstanceDescriptionList = QList< InstanceDescription >;
|
||||
/** @brief All the module instances used
|
||||
*
|
||||
* Each module-instance mentioned in `settings.conf` has an entry
|
||||
* in the moduleInstances list -- both custom entries that are
|
||||
* in the *instances* section, and each module mentioned in the
|
||||
* *sequence*.
|
||||
*/
|
||||
InstanceDescriptionList moduleInstances() const;
|
||||
|
||||
using ModuleSequence = QList< QPair< ModuleSystem::Action, QStringList > >;
|
||||
/** @brief Representation of *sequence* of execution
|
||||
*
|
||||
* Each "section" of the *sequence* key in `settings.conf` gets an
|
||||
* entry here, stating what kind of action is taken and which modules
|
||||
* take part (in order). Each entry in the list is an instance key
|
||||
* which can be found in the moduleInstances() list.
|
||||
*/
|
||||
ModuleSequence modulesSequence() const;
|
||||
|
||||
QString brandingComponentName() const;
|
||||
|
Loading…
Reference in New Issue
Block a user