*/
#include <fstream>
-#include <msp/path/utils.h>
+#include <msp/fs/stat.h>
#include <msp/strings/utils.h>
#include "builder.h"
#include "dependencycache.h"
-#include "package.h"
+#include "sourcepackage.h"
using namespace std;
using namespace Msp;
-DependencyCache::DependencyCache(Package &p):
+DependencyCache::DependencyCache(SourcePackage &p):
package(p),
changed(false)
{ }
{
DepsMap::const_iterator i=deps.find(tgt);
if(i==deps.end())
- {
- static StringList dummy;
- return dummy;
- }
+ throw KeyError("Unknown dependencies", tgt);
+
return i->second;
}
deps[parts[0]]=StringList(parts.begin()+1, parts.end());
}
- struct stat st;
- Path::stat(fn, st);
- mtime=Time::TimeStamp::from_unixtime(st.st_mtime);
+ mtime=Time::TimeStamp::from_unixtime(FS::stat(fn).st_mtime);
}