summaryrefslogtreecommitdiff
path: root/ftparchive/writer.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-01-20 16:01:40 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-01-20 16:01:40 +0100
commit3cb3fe76e90283a5b3fe7105e4854d4bac13bfeb (patch)
tree773b6bbedbc9d122ebc21a84f9db680b93813f4f /ftparchive/writer.cc
parentfe0f7911b650918e1d511b3453664a07f6d966d0 (diff)
* ftparchive/writer.cc:
- add config option to search for more patterns in release command
Diffstat (limited to 'ftparchive/writer.cc')
-rw-r--r--ftparchive/writer.cc26
1 files changed, 15 insertions, 11 deletions
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index d7d699ddc..55fac89bd 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -306,7 +306,7 @@ PackagesWriter::PackagesWriter(string const &DB,string const &Overrides,string c
Output = stdout;
SetExts(".deb .udeb");
DeLinkLimit = 0;
-
+
// Process the command line options
DoMD5 = _config->FindB("APT::FTPArchive::MD5",true);
DoSHA1 = _config->FindB("APT::FTPArchive::SHA1",true);
@@ -907,16 +907,20 @@ bool ContentsWriter::ReadFromPkgs(string const &PkgFile,string const &PkgCompres
/* */
ReleaseWriter::ReleaseWriter(string const &DB)
{
- AddPattern("Packages");
- AddPattern("Packages.gz");
- AddPattern("Packages.bz2");
- AddPattern("Packages.lzma");
- AddPattern("Sources");
- AddPattern("Sources.gz");
- AddPattern("Sources.bz2");
- AddPattern("Sources.lzma");
- AddPattern("Release");
- AddPattern("md5sum.txt");
+ if (_config->FindB("APT::FTPArchive::Release::Default-Patterns", true) == true)
+ {
+ AddPattern("Packages");
+ AddPattern("Packages.gz");
+ AddPattern("Packages.bz2");
+ AddPattern("Packages.lzma");
+ AddPattern("Sources");
+ AddPattern("Sources.gz");
+ AddPattern("Sources.bz2");
+ AddPattern("Sources.lzma");
+ AddPattern("Release");
+ AddPattern("md5sum.txt");
+ }
+ AddPatterns(_config->FindVector("APT::FTPArchive::Release::Patterns"));
Output = stdout;
time_t const now = time(NULL);