diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-09 13:15:34 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-09 13:15:34 +0200 |
commit | 189bb640d2443a5fcaade2ce169429c629ba3148 (patch) | |
tree | 1046a11805ae78557e9947569f91c2f8fa853f88 /ftparchive | |
parent | ba74b79fb5c74d916f9bfe1b314e8107a9e7eab4 (diff) | |
parent | 308b793694774eece8765d172b8e989d8ed29925 (diff) |
merged from lp:~donkult/apt/sid
Diffstat (limited to 'ftparchive')
-rw-r--r-- | ftparchive/writer.cc | 10 | ||||
-rw-r--r-- | ftparchive/writer.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 6cda29b21..650eec57c 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -924,6 +924,15 @@ ReleaseWriter::ReleaseWriter(string const &DB) datestr[0] = '\0'; } + time_t const validuntil = now + _config->FindI("APT::FTPArchive::Release::ValidTime", 0); + char validstr[128]; + if (now == validuntil || + strftime(validstr, sizeof(validstr), "%a, %d %b %Y %H:%M:%S UTC", + gmtime(&validuntil)) == 0) + { + datestr[0] = '\0'; + } + map<string,string> Fields; Fields["Origin"] = ""; Fields["Label"] = ""; @@ -931,6 +940,7 @@ ReleaseWriter::ReleaseWriter(string const &DB) Fields["Version"] = ""; Fields["Codename"] = ""; Fields["Date"] = datestr; + Fields["Valid-Until"] = validstr; Fields["Architectures"] = ""; Fields["Components"] = ""; Fields["Description"] = ""; diff --git a/ftparchive/writer.h b/ftparchive/writer.h index 3123a7f46..49d430c47 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -72,6 +72,7 @@ class FTWScanner bool SetExts(string const &Vals); FTWScanner(string const &Arch = string()); + virtual ~FTWScanner() {}; }; class TranslationWriter |