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/writer.cc | |
parent | ba74b79fb5c74d916f9bfe1b314e8107a9e7eab4 (diff) | |
parent | 308b793694774eece8765d172b8e989d8ed29925 (diff) |
merged from lp:~donkult/apt/sid
Diffstat (limited to 'ftparchive/writer.cc')
-rw-r--r-- | ftparchive/writer.cc | 10 |
1 files changed, 10 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"] = ""; |