privateUpdate():
Make sure opkg-commands re executed aunder certain error conditions: Failure of customerEnvironment(), filesToUpdate() or syncCustomerRepositoryAndFS().
This commit is contained in:
		@@ -456,6 +456,14 @@ void Worker::privateUpdate() {
 | 
				
			|||||||
    //
 | 
					    //
 | 
				
			||||||
    ////////////////////////////////////////////////////////////////////////////
 | 
					    ////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
    if ((continueUpdate = customerEnvironment()) == false) {
 | 
					    if ((continueUpdate = customerEnvironment()) == false) {
 | 
				
			||||||
 | 
					        // even if something goes wrong creating the environment, try to execute
 | 
				
			||||||
 | 
					        // opkg_commands
 | 
				
			||||||
 | 
					        if (QDir(m_customerRepository).exists()) {
 | 
				
			||||||
 | 
					            // always execute contents of opkg_commands-file
 | 
				
			||||||
 | 
					            m_filesToUpdate.clear();
 | 
				
			||||||
 | 
					            m_filesToUpdate << "etc/psa_update/opkg_commands";
 | 
				
			||||||
 | 
					            execOpkgCommands();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
					    m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
				
			||||||
@@ -470,6 +478,14 @@ void Worker::privateUpdate() {
 | 
				
			|||||||
    //
 | 
					    //
 | 
				
			||||||
    ////////////////////////////////////////////////////////////////////////////
 | 
					    ////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
    if ((continueUpdate = filesToUpdate()) == false) {
 | 
					    if ((continueUpdate = filesToUpdate()) == false) {
 | 
				
			||||||
 | 
					        // even if something goes wrong in filesToUpdate, try to execute
 | 
				
			||||||
 | 
					        // opkg_commands
 | 
				
			||||||
 | 
					        if (QDir(m_customerRepository).exists()) {
 | 
				
			||||||
 | 
					            // always execute contents of opkg_commands-file
 | 
				
			||||||
 | 
					            m_filesToUpdate.clear();
 | 
				
			||||||
 | 
					            m_filesToUpdate << "etc/psa_update/opkg_commands";
 | 
				
			||||||
 | 
					            execOpkgCommands();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
					    m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
				
			||||||
@@ -483,6 +499,14 @@ void Worker::privateUpdate() {
 | 
				
			|||||||
    //
 | 
					    //
 | 
				
			||||||
    ////////////////////////////////////////////////////////////////////////////
 | 
					    ////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
    if ((continueUpdate = syncCustomerRepositoryAndFS()) == false) {
 | 
					    if ((continueUpdate = syncCustomerRepositoryAndFS()) == false) {
 | 
				
			||||||
 | 
					        // even if something goes wrong with rsync, try to execute
 | 
				
			||||||
 | 
					        // opkg_commands
 | 
				
			||||||
 | 
					        if (QDir(m_customerRepository).exists()) {
 | 
				
			||||||
 | 
					            // always execute contents of opkg_commands-file
 | 
				
			||||||
 | 
					            m_filesToUpdate.clear();
 | 
				
			||||||
 | 
					            m_filesToUpdate << "etc/psa_update/opkg_commands";
 | 
				
			||||||
 | 
					            execOpkgCommands();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    lst = QStringList(QString(smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS]));
 | 
					    lst = QStringList(QString(smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS]));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user