diff --git a/CHANGELOG b/CHANGELOG index 6d86fad3..d4aec86e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,8 @@ # Change Log +## [7.3.10] 08/18/2020 +# IMPROVEMENTS: +* Fixed check for a new version of vagrant package + ## [7.3.9] 08/09/2020 # IMPROVEMENTS: * New update mechanism for Control Center and it's components diff --git a/hub/include/RestWorker.h b/hub/include/RestWorker.h index 98c3acd5..d8445745 100644 --- a/hub/include/RestWorker.h +++ b/hub/include/RestWorker.h @@ -204,11 +204,14 @@ private slots: public: void set_next_cc_version(const QString& version); void set_next_p2p_version(const QString& version); + void set_next_vagrant_version(const QString& version); const QString& get_next_cc_version() const; const QString& get_next_p2p_version() const; + const QString& get_next_vagrant_version() const; private: QString next_cc_version; QString next_p2p_version; + QString next_vagrant_version; }; #endif // CRESTWORKER_H diff --git a/hub/src/DlgAbout.cpp b/hub/src/DlgAbout.cpp index 2c157704..8e4141b4 100644 --- a/hub/src/DlgAbout.cpp +++ b/hub/src/DlgAbout.cpp @@ -676,6 +676,12 @@ void DlgAbout::check_for_versions_and_updates() { std::vector::iterator p2p_it = p2p_meta.begin(); CRestWorker::Instance()->set_next_p2p_version(p2p_it->version()); } + std::vector vagrant_meta = CRestWorker::Instance()->download_remote_file_meta(vagrant_kurjun_package_name()); + if (!vagrant_meta.empty()) + { + std::vector::iterator vagrant_it = vagrant_meta.begin(); + CRestWorker::Instance()->set_next_vagrant_version(vagrant_it->version()); + } int cur_components_count = DlgAboutInitializer::COMPONENTS_COUNT - 1; // -1 for CC version check QString current_hypervisor = VagrantProvider::Instance()->CurrentVal(); diff --git a/hub/src/RestWorker.cpp b/hub/src/RestWorker.cpp index ec51fa09..c85befeb 100644 --- a/hub/src/RestWorker.cpp +++ b/hub/src/RestWorker.cpp @@ -1154,6 +1154,11 @@ void CRestWorker::set_next_p2p_version(const QString& version) next_p2p_version = version; } +void CRestWorker::set_next_vagrant_version(const QString& version) +{ + next_vagrant_version = version; +} + const QString& CRestWorker::get_next_cc_version() const { return next_cc_version; @@ -1164,4 +1169,9 @@ const QString& CRestWorker::get_next_p2p_version() const return next_p2p_version; } +const QString& CRestWorker::get_next_vagrant_version() const +{ + return next_vagrant_version; +} + //////////////////////////////////////////////////////////////////////////// diff --git a/hub/src/updater/UpdaterComponentP2P.cpp b/hub/src/updater/UpdaterComponentP2P.cpp index d08e78b7..33b4322e 100644 --- a/hub/src/updater/UpdaterComponentP2P.cpp +++ b/hub/src/updater/UpdaterComponentP2P.cpp @@ -62,28 +62,11 @@ CUpdaterComponentP2P::download_p2p_path() { bool CUpdaterComponentP2P::update_available_internal() { - auto next_version = CRestWorker::Instance()->get_next_p2p_version(); if (next_version == UNKNOWN_VERSION) return false; - QString p2p_version = ""; + QString p2p_version; CSystemCallWrapper::p2p_version(p2p_version); - qDebug() << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; - qDebug() << "Current p2p version: " << p2p_version; - qDebug() << "Next p2p version: " << next_version; return next_version != p2p_version; - - std::vector fi = - CRestWorker::Instance()->get_gorjun_file_info(p2p_kurjun_file_name()); - if (fi.empty()) return false; - QString str_p2p_path = p2p_path(); - if (str_p2p_path == P2P) return false; - QString md5_current = CCommons::FileMd5(str_p2p_path); - QString md5_kurjun = fi[0].md5_sum(); - qDebug() - <<"Checking for p2p update" - <<"md5_current: "<get_next_vagrant_version(); + if (next_version == UNKNOWN_VERSION) return false; QString version; CSystemCallWrapper::vagrant_version(version); - return version == "undefined"; + return version != next_version; } chue_t CUpdaterComponentVAGRANT::install_internal() { diff --git a/version b/version index 7dc1035a..6fddc82b 100644 --- a/version +++ b/version @@ -1 +1 @@ -7.3.9 +7.3.10