Always execute commands contained in opkg_commands, even if no
change in opkg_commands. WAIT button in ISMAS must still be activated.
This commit is contained in:
		
							
								
								
									
										42
									
								
								worker.cpp
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								worker.cpp
									
									
									
									
									
								
							@@ -727,6 +727,10 @@ bool Worker::customerEnvironment(int progress) {
 | 
			
		||||
bool Worker::filesToUpdate() {
 | 
			
		||||
    emit appendText("\nFetch changes files ...");
 | 
			
		||||
    startProgressLoop();
 | 
			
		||||
 | 
			
		||||
    // always execute contents of opkg_commands-file
 | 
			
		||||
    m_filesToUpdate << "etc/psa_update/opkg_commands";
 | 
			
		||||
 | 
			
		||||
    if (std::optional<QString> changes = m_gc.gitFetch()) {
 | 
			
		||||
        stopProgressLoop();
 | 
			
		||||
        int progress = (m_mainWindow->progressValue()/10) + 10;
 | 
			
		||||
@@ -741,38 +745,38 @@ bool Worker::filesToUpdate() {
 | 
			
		||||
            setProgress(progress + 20);
 | 
			
		||||
            if (m_gc.gitPull()) {
 | 
			
		||||
                emit replaceLast(QString("Fetch changes files ..."), UPDATE_STEP_DONE);
 | 
			
		||||
                m_filesToUpdate = changedFileNames.value();
 | 
			
		||||
                m_filesToUpdate << changedFileNames.value();
 | 
			
		||||
            } else {
 | 
			
		||||
                emit showErrorMessage("files to update", "pulling files failed");
 | 
			
		||||
                Utils::printCriticalErrorMsg("PULLING FILES FAILED");
 | 
			
		||||
 | 
			
		||||
                Utils::printInfoMsg("FILES-TO-UPDATE " + m_filesToUpdate.join(','));
 | 
			
		||||
                emit replaceLast(QString("Fetch changes files ..."), UPDATE_STEP_FAIL);
 | 
			
		||||
 | 
			
		||||
                stopProgressLoop();
 | 
			
		||||
                setProgress(100);
 | 
			
		||||
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
            emit showErrorMessage("files to update", "pulling files failed");
 | 
			
		||||
            Utils::printCriticalErrorMsg("PULLING FILES FAILED");
 | 
			
		||||
 | 
			
		||||
        } else {
 | 
			
		||||
            emit showErrorMessage("files to update", "no files to update (checked-in any files?)");
 | 
			
		||||
            Utils::printCriticalErrorMsg("NO FILES TO UPDATE (CHECKED IN ANY FILES?)");
 | 
			
		||||
        }
 | 
			
		||||
        setProgress(progress + 30);
 | 
			
		||||
    } else {
 | 
			
		||||
        stopProgressLoop();
 | 
			
		||||
        int progress = (m_mainWindow->progressValue()/10) + 10;
 | 
			
		||||
        setProgress(progress + 30);
 | 
			
		||||
 | 
			
		||||
        emit showErrorMessage("files to update",
 | 
			
		||||
                              QString("no changes in ") + m_customerRepository +
 | 
			
		||||
                              " (checked-in any files?)");
 | 
			
		||||
        Utils::printInfoMsg("FILES-TO-UPDATE " + m_filesToUpdate.join(','));
 | 
			
		||||
 | 
			
		||||
        m_filesToUpdate.removeDuplicates();
 | 
			
		||||
        int const size = m_filesToUpdate.size();
 | 
			
		||||
        if (size > 1) {
 | 
			
		||||
            emit appendText(QString("Found %1 files to update :").arg(size), UPDATE_STEP_DONE);
 | 
			
		||||
            for (int i = 0; i < size; ++i) {
 | 
			
		||||
                emit appendText(QString("\n ") + m_filesToUpdate.at(i));
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            emit appendText("Found 1 file to update :", UPDATE_STEP_DONE);
 | 
			
		||||
            emit appendText(QString("\n ") + m_filesToUpdate.at(0));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        setProgress(progress + 30);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    emit replaceLast(QString("Fetch changes files ..."), UPDATE_STEP_FAIL);
 | 
			
		||||
    setProgress(100);
 | 
			
		||||
    return false;
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool Worker::updateFiles(quint8 percent) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user