summaryrefslogtreecommitdiff
path: root/apt-pkg/sourcelist.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-07-28 15:21:21 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-07-28 15:21:21 +0200
commitd074870043ffcd404e014d5793318427435c3ca1 (patch)
treeb291c24d6b8b11843fc008410a5ea1a60c0873dd /apt-pkg/sourcelist.cc
parentd3d8ed4a439ffaa0cdec7053001f5810016a4c44 (diff)
parent3671f6810b6306a07f0002b0a808435dad367ab0 (diff)
merged from debian-experimental2
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r--apt-pkg/sourcelist.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 851eefdfe..c96ccfd77 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -341,4 +341,22 @@ bool pkgSourceList::ReadSourceDir(string Dir)
}
/*}}}*/
+// GetLastModified() /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+time_t pkgSourceList::GetLastModifiedTime()
+{
+ // go over the parts
+ string Main = _config->FindFile("Dir::Etc::sourcelist");
+ string Parts = _config->FindDir("Dir::Etc::sourceparts");
+ vector<string> const List = GetListOfFilesInDir(Parts, "list", true);
+
+ // calculate the time
+ time_t mtime_sources = GetModificationTime(Main);
+ for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++)
+ mtime_sources = std::max(mtime_sources, GetModificationTime(*I));
+
+ return mtime_sources;
+}
+ /*}}}*/