X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstalledfile.cpp;h=4638cc40d6cec73cdb4b9af420c3d947da385523;hb=b8407de928d2c5421c35474df1c3185fd494ef68;hp=f2909f6127ec94d72f475ed200a9182276fd4742;hpb=9134ce7f2225eb301c7b6c9aca8521c4e82dc065;p=builder.git diff --git a/source/installedfile.cpp b/source/installedfile.cpp index f2909f6..4638cc4 100644 --- a/source/installedfile.cpp +++ b/source/installedfile.cpp @@ -11,7 +11,7 @@ InstalledFile::InstalledFile(Builder &b, const SourcePackage &p, FileTarget &s, FileTarget(b, p, generate_target_path(b.get_prefix(), s, loc)), source(s) { - add_depend(source); + add_dependency(source); if(const SharedLibrary *shlib = dynamic_cast(&source)) if(!shlib->get_soname().empty()) @@ -58,3 +58,10 @@ void InstalledFile::check_rebuild() else if(!link.empty() && !FS::exists(link)) mark_rebuild("Symlink does not exist"); } + +void InstalledFile::clean() +{ + if(!link.empty() && mtime) + FS::unlink(link); + FileTarget::clean(); +}