diff --git a/UpdatePTUDevCtrl/worker.cpp b/UpdatePTUDevCtrl/worker.cpp index c34c81c..890deac 100644 --- a/UpdatePTUDevCtrl/worker.cpp +++ b/UpdatePTUDevCtrl/worker.cpp @@ -511,9 +511,8 @@ void Worker::privateUpdate() { if ((continueUpdate = downloadFilesToPSAHardware()) == false) { return; } - lst = QStringList(QString(smap[UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE_SUCCESS])); - ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE)); - setProgress(_DOWNLOAD_FILES_TO_PSA_HARDWARE_SUCCESS); + lst = QStringList(QString("DONE")); + ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE_SUCCESS)); //////////////////////////////////////////////////////////////////////////// // @@ -963,13 +962,16 @@ bool Worker::execOpkgCommands() { bool Worker::downloadFilesToPSAHardware() { m_displayIndex = 0; + QStringList lst(QString("START")); - GUI(m_filesToDownload) << (CONSOLE(m_filesToDownload) << UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE); - setProgress(_DOWNLOAD_FILES_TO_PSA_HARDWARE); + ISMAS(lst) << (GUI(m_filesToDownload) << (CONSOLE(m_filesToDownload) << UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE)); if (m_noUpdatePsaHardware == false) { if (computeFilesToDownload() > 0) { - QStringList lst = m_filesToDownload; + lst.clear(); + for (int i = 0; i < m_filesToDownload.size(); ++i) { + lst << QFileInfo(m_filesToDownload.at(i)).fileName(); + } ISMAS(lst) << (CONSOLE(lst) << UPDATE_STEP::FILES_TO_DOWNLOAD); if (m_update && m_update->doUpdate(m_displayIndex, m_filesToDownload)) { @@ -982,7 +984,7 @@ bool Worker::downloadFilesToPSAHardware() { return true; } - CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE); + ISMAS(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE)); setProgress(_DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE); return false; @@ -993,14 +995,20 @@ bool Worker::downloadFilesToPSAHardware() { } bool Worker::syncCustomerRepositoryAndFS() { - ISMAS() << (GUI() << (CONSOLE() << UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY)); + QString msg("START"); + QStringList lst(msg); + ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY)); + lst.clear(); if (QDir(m_customerRepository).exists()) { if (QDir::setCurrent(m_customerRepository)) { Command md("bash"); if (!md.execute(m_customerRepository, QStringList() << "-c" << "mkdir -p /etc/psa_config /etc/dc /etc/psa_tariff")) { - qCritical() << "COULD NOT EXECUTE '" << md.command() << "' exitCode=(" << md.exitCode() << ")"; + msg = QString("COULD NOT EXECUTE '%1', exitCode=%2").arg(md.command()).arg(md.exitCode()); + qCritical() << msg; + QStringList lst2(msg); + ISMAS(lst2) << (CONSOLE(lst2) << UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY); } QString const params("-v " "--recursive " @@ -1072,9 +1080,13 @@ bool Worker::syncCustomerRepositoryAndFS() { setProgress(_SYNC_CUSTOMER_REPOSITORY_SUCCESS); return true; } + } else { + lst << QString("CAN NOT CD TO CUST-REPO %1").arg(m_customerRepository); } + } else { + lst << QString("CUST-REPO %1 DOES NOT EXIST").arg(m_customerRepository); } - ISMAS() << (GUI() << (CONSOLE() << (m_lastFailedUpdateStep = UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_FAILURE))); + ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_FAILURE))); setProgress(_SYNC_CUSTOMER_REPOSITORY_FAILURE); return false; }