privateUpdate():

Make sure opkg-commands re executed aunder certain error conditions:

	Failure of customerEnvironment(), filesToUpdate() or
	syncCustomerRepositoryAndFS().
This commit is contained in:
Gerhard Hoffmann 2024-10-23 13:23:13 +02:00
parent 9a9cce126a
commit 201a1cbab9

View File

@ -456,6 +456,14 @@ void Worker::privateUpdate() {
//
////////////////////////////////////////////////////////////////////////////
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;
}
m_versionInfo = m_gc.gitShowReason(m_branchName);
@ -470,6 +478,14 @@ void Worker::privateUpdate() {
//
////////////////////////////////////////////////////////////////////////////
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;
}
m_versionInfo = m_gc.gitShowReason(m_branchName);
@ -483,6 +499,14 @@ void Worker::privateUpdate() {
//
////////////////////////////////////////////////////////////////////////////
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;
}
lst = QStringList(QString(smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS]));