From a5803a0c1decb90ccd74ba4daac0c3b037b879f0 Mon Sep 17 00:00:00 2001 From: Firefly35 Date: Mon, 27 Sep 2021 09:46:20 +0200 Subject: [PATCH] fix: improve messages when remote search order is inverted --- src/managers/DependencyManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/managers/DependencyManager.cpp b/src/managers/DependencyManager.cpp index 843ac6c..48b91c6 100755 --- a/src/managers/DependencyManager.cpp +++ b/src/managers/DependencyManager.cpp @@ -176,6 +176,7 @@ void DependencyManager::retrieveDependency(Dependency & dependency) { fs::detail::utf8_codecvt_facet utf8; shared_ptr fileRetriever = FileHandlerFactory::instance()->getFileHandler(dependency, m_options); + std::string currentRepositoryType = dependency.getRepositoryType(); if (m_options.invertRepositoryOrder() && dependency.getType() == Dependency::Type::REMAKEN) {// what about cache management in this case ? fileRetriever = FileHandlerFactory::instance()->getAlternateHandler(dependency.getType(),m_options); if (!fileRetriever) { // no alternate repository found @@ -183,6 +184,7 @@ void DependencyManager::retrieveDependency(Dependency & dependency) throw std::runtime_error("No alternate repository defined for '" + dependency.getPackageName() +":" +dependency.getVersion() + "'"); } dependency.changeBaseRepository(m_options.getAlternateRepoUrl()); + currentRepositoryType = m_options.getAlternateRepoType(); } std::string source = fileRetriever->computeSourcePath(dependency); fs::path outputDirectory = fileRetriever->computeLocalDependencyRootDir(dependency); @@ -190,7 +192,7 @@ void DependencyManager::retrieveDependency(Dependency & dependency) fs::path binDirectory = fileRetriever->computeRootBinDir(dependency); if (installDep(dependency, source, outputDirectory, libDirectory, binDirectory) || m_options.force()) { try { - std::cout<<"=> Installing "< Installing "<installArtefact(dependency); } @@ -200,7 +202,7 @@ void DependencyManager::retrieveDependency(Dependency & dependency) fileRetriever = FileHandlerFactory::instance()->getFileHandler(dependency, m_options); } if (!fileRetriever) { // no alternate repository found - BOOST_LOG_TRIVIAL(error)<<"==> Unable to find '"< Unable to find '"<