- DependencyCache &deps_cache=comp->get_package().get_deps_cache();
- if(mtime>deps_cache.get_mtime())
+ const SourcePackage &spkg=comp->get_package();
+ string relname=FS::relative(name, spkg.get_source()).str();
+ DependencyCache &deps_cache=spkg.get_deps_cache();
+ bool deps_found=false;
+ if(mtime<deps_cache.get_mtime())
+ {
+ try
+ {
+ includes=deps_cache.get_deps(relname);
+ deps_found=true;
+ }
+ catch(const KeyError &)
+ { }
+ }
+
+ if(!deps_found)