[libcalamares] Weigh unpackfs extra heavy
- This is a gross hack, which hard-codes unpackfs as much-heavier than other Python modules.
This commit is contained in:
parent
0c9188ee83
commit
d4b24894cb
@ -170,7 +170,8 @@ namespace Calamares
|
||||
{
|
||||
|
||||
|
||||
PythonJob::PythonJob( const QString& scriptFile,
|
||||
PythonJob::PythonJob( const QString& instance,
|
||||
const QString& scriptFile,
|
||||
const QString& workingPath,
|
||||
const QVariantMap& moduleConfiguration,
|
||||
QObject* parent )
|
||||
@ -179,12 +180,18 @@ PythonJob::PythonJob( const QString& scriptFile,
|
||||
, m_workingPath( workingPath )
|
||||
, m_description()
|
||||
, m_configurationMap( moduleConfiguration )
|
||||
, m_weight( (instance == QStringLiteral( "unpackfs" )) ? 8.0 : 1.0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PythonJob::~PythonJob() {}
|
||||
|
||||
qreal
|
||||
PythonJob::getJobWeight() const
|
||||
{
|
||||
return m_weight;
|
||||
}
|
||||
|
||||
QString
|
||||
PythonJob::prettyName() const
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include "Job.h"
|
||||
|
||||
#include "modulesystem/InstanceKey.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
namespace CalamaresPython
|
||||
@ -36,7 +38,8 @@ class PythonJob : public Job
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PythonJob( const QString& scriptFile,
|
||||
explicit PythonJob( const QString& instance, // TODO: InstanceKey
|
||||
const QString& scriptFile,
|
||||
const QString& workingPath,
|
||||
const QVariantMap& moduleConfiguration = QVariantMap(),
|
||||
QObject* parent = nullptr );
|
||||
@ -46,6 +49,8 @@ public:
|
||||
QString prettyStatusMessage() const override;
|
||||
JobResult exec() override;
|
||||
|
||||
virtual qreal getJobWeight() const override;
|
||||
|
||||
private:
|
||||
friend class CalamaresPython::Helper;
|
||||
friend class CalamaresPython::PythonJobInterface;
|
||||
@ -56,6 +61,7 @@ private:
|
||||
QString m_workingPath;
|
||||
QString m_description;
|
||||
QVariantMap m_configurationMap;
|
||||
qreal m_weight;
|
||||
};
|
||||
|
||||
} // namespace Calamares
|
||||
|
@ -49,7 +49,7 @@ PythonJobModule::loadSelf()
|
||||
return;
|
||||
}
|
||||
|
||||
m_job = Calamares::job_ptr( new PythonJob( m_scriptFileName, m_workingPath, m_configurationMap ) );
|
||||
m_job = Calamares::job_ptr( new PythonJob( name(), m_scriptFileName, m_workingPath, m_configurationMap ) );
|
||||
m_loaded = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user