From: Mikko Rasa Date: Fri, 10 Oct 2014 19:08:45 +0000 (+0300) Subject: Only use files from the first overlay that has them X-Git-Url: http://git.tdb.fi/?p=builder.git;a=commitdiff_plain;h=2f5311c7ed2735926b6fb107a657e77ac331e4c1 Only use files from the first overlay that has them This allows special-casing pieces of code for some platforms without fragmenting the directory structure too badly. --- diff --git a/source/component.cpp b/source/component.cpp index 833a0ed..a42b81c 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -99,12 +99,21 @@ Component::SourceList Component::collect_source_files() const if(FS::is_dir(opath)) dirs.push_back(opath); } + set overlay_files; for(SourceList::const_iterator j=dirs.begin(); j!=dirs.end(); ++j) { package.get_builder().get_logger().log("files", format("Traversing %s", *j)); list sfiles = list_files(*j); for(list::iterator k=sfiles.begin(); k!=sfiles.end(); ++k) + { + if(j!=dirs.begin()) + { + if(overlay_files.count(*k)) + continue; + overlay_files.insert(*k); + } files.push_back(*j / *k); + } } } else