Skip to content

Commit

Permalink
fix: #6 - ignore remaken cache for conan dependencies and fix empty l…
Browse files Browse the repository at this point in the history
…ines in .remaken-cache
  • Loading branch information
Stephane Leduc committed Jul 18, 2023
2 parents 947be31 + 65439b5 commit c9ab7fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/Cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ void Cache::load() {
while (!fis.eof()) {
string curStr;
getline(fis,curStr);
m_cachedUrls.push_back(curStr);
if (!curStr.empty()) {
m_cachedUrls.push_back(curStr);
}
}
fis.close();
m_loaded = true;
Expand Down
8 changes: 5 additions & 3 deletions src/managers/DependencyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ bool DependencyManager::installDep(Dependency & dependency, const std::string &
withHeaders = fs::exists(outputDirectory/Constants::PKGINFO_FOLDER/".headers");
}

if (dependency.getType() != Dependency::Type::REMAKEN) {
if (dependency.getType() != Dependency::Type::REMAKEN && dependency.getType() != Dependency::Type::CONAN) {
if (m_options.useCache()) {
if (!m_cache.contains(source)) {
return true;
Expand Down Expand Up @@ -258,8 +258,10 @@ void DependencyManager::retrieveDependency(Dependency & dependency, DependencyF
}
}
std::cout<<"===> "<<dependency.getName()<<" installed in "<<outputDirectory<<std::endl;
if (m_options.useCache()) {
m_cache.add(source);
if (dependency.getType() != Dependency::Type::CONAN) {
if (m_options.useCache()) {
m_cache.add(source);
}
}
}
catch (const std::runtime_error & e) {
Expand Down

0 comments on commit c9ab7fc

Please sign in to comment.