From f5cd2dbfc493127b18d9ea2b0bb258b736b91cd4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 29 May 2010 19:10:19 +0200 Subject: * ftparchive/writer.h: - add a virtual destructor to FTWScanner class (for cppcheck) --- ftparchive/writer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ftparchive') diff --git a/ftparchive/writer.h b/ftparchive/writer.h index 3123a7f46..c08ddea85 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 -- cgit v1.2.3 From 4c265635a8417b857a3a8f537c74313d5533da9b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 31 May 2010 12:58:20 +0200 Subject: =?UTF-8?q?i=20managed=20to=20commit=20broken=20code=E2=80=A6=20wh?= =?UTF-8?q?ich=20(at=20least=20in=20my=20mind)=20worked=20yesterday.=20Str?= =?UTF-8?q?ange=E2=80=A6=20anyway=20only=20small=20fixes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ftparchive/writer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ftparchive') diff --git a/ftparchive/writer.h b/ftparchive/writer.h index c08ddea85..49d430c47 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -72,7 +72,7 @@ class FTWScanner bool SetExts(string const &Vals); FTWScanner(string const &Arch = string()); - virtual ~FTWScanner(); + virtual ~FTWScanner() {}; }; class TranslationWriter -- cgit v1.2.3 From c99e48ec26e693d9aa4a2a9f868284f7aa49784d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 9 Jun 2010 00:12:14 +0200 Subject: * ftparchive/writer.cc: - add ValidTime option to generate a Valid-Until header in Release file --- ftparchive/writer.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ftparchive') 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 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"] = ""; -- cgit v1.2.3