diff --git a/UpdatePTUDevCtrl/worker.cpp b/UpdatePTUDevCtrl/worker.cpp index 6e4d989..e7d9081 100644 --- a/UpdatePTUDevCtrl/worker.cpp +++ b/UpdatePTUDevCtrl/worker.cpp @@ -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]));