diff --git a/src/libcalamares/Job.h b/src/libcalamares/Job.h index 04b4560a4..14924af35 100644 --- a/src/libcalamares/Job.h +++ b/src/libcalamares/Job.h @@ -40,7 +40,8 @@ public: { NoError = 0, GenericError = -1, - PythonUncaughtException = 1 + PythonUncaughtException = 1, + InvalidConfiguration = 2 } ; JobResult( const JobResult& rhs ) = delete; diff --git a/src/modules/oemid/IDJob.cpp b/src/modules/oemid/IDJob.cpp index 07ce1efad..16461b191 100644 --- a/src/modules/oemid/IDJob.cpp +++ b/src/modules/oemid/IDJob.cpp @@ -82,13 +82,12 @@ Calamares::JobResult IDJob::exec() QString targetFile = QStringLiteral( "oem-id" ); QString rootMount = gs->value( "rootMountPoint" ).toString(); - static const char noRoot[] = "No rootMountPoint is set."; - static const char yesRoot[] = "rootMountPoint is set:"; - - QString targetPath; - + // Don't bother translating internal errors if ( rootMount.isEmpty() && Calamares::Settings::instance()->doChroot() ) - cWarning() << Logger::SubEntry << noRoot; - + return Calamares::JobResult::internalError( + "OEM Batch Identifier", + "No rootMountPoint is set, but a chroot is required. " + "Is there a module before oemid that sets up the partitions?", + Calamares::JobResult::InvalidConfiguration ); return writeId( Calamares::Settings::instance()->doChroot() ? rootMount + targetDir : targetDir, targetFile, m_batchIdentifier ); }