summaryrefslogtreecommitdiff
path: root/ftparchive
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-03-26 19:18:21 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-03-26 19:18:21 +0100
commit4e794c509becfd7e2bddfddc1205dc81397a48bd (patch)
treed5e97403df895502384d4d2cdaa107dac7e8172d /ftparchive
parent66905344357d03c206d99964a0d941b261f7146c (diff)
Inclusion of Long Descriptions in the Packages files can be set now
also in TreeDefaults and Tree to support generation of archives which should support and which shouldn't support splitted out Translation-en files in the same run.
Diffstat (limited to 'ftparchive')
-rw-r--r--ftparchive/apt-ftparchive.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index e69c88ddd..f3e91d90d 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -63,6 +63,7 @@ struct PackageMap
string SrcExtraOverride;
// Translation master file
+ bool LongDesc;
TranslationWriter *TransWriter;
// Contents
@@ -103,7 +104,7 @@ struct PackageMap
vector<PackageMap>::iterator End,
unsigned long &Left);
- PackageMap() : TransWriter(NULL), DeLinkLimit(0), Permissions(1),
+ PackageMap() : LongDesc(true), TransWriter(NULL), DeLinkLimit(0), Permissions(1),
ContentsDone(false), PkgDone(false), SrcDone(false),
ContentsMTime(0) {};
};
@@ -174,6 +175,7 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats)
Packages.InternalPrefix = flCombine(ArchiveDir,InternalPrefix);
Packages.TransWriter = TransWriter;
+ Packages.LongDescription = LongDesc;
Packages.Stats.DeLinkBytes = Stats.DeLinkBytes;
Packages.DeLinkLimit = DeLinkLimit;
@@ -456,6 +458,9 @@ void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
string DFLFile = Setup.Find("TreeDefault::FileList", "");
string DSFLFile = Setup.Find("TreeDefault::SourceFileList", "");
+ bool const LongDescription = Setup.FindB("TreeDefault::LongDescription",
+ _config->FindB("APT::FTPArchive::LongDescription", true));
+
// Process 'tree' type sections
const Configuration::Item *Top = Setup.Tree("tree");
for (Top = (Top == 0?0:Top->Child); Top != 0;)
@@ -474,8 +479,9 @@ void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
{"$(SECTION)",&Section},
{"$(ARCH)",&Arch},
{}};
+ bool const LongDesc = Block.FindB("LongDescription", LongDescription);
TranslationWriter *TransWriter;
- if (DTrans.empty() == false)
+ if (DTrans.empty() == false && LongDesc == false)
{
string const TranslationFile = flCombine(Setup.FindDir("Dir::ArchiveDir"),
SubstVar(Block.Find("Translation", DTrans.c_str()), Vars));
@@ -509,6 +515,7 @@ void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
Itm.PkgFile = SubstVar(Block.Find("Packages",DPkg.c_str()),Vars);
Itm.Tag = SubstVar("$(DIST)/$(SECTION)/$(ARCH)",Vars);
Itm.Arch = Arch;
+ Itm.LongDesc = LongDesc;
if (TransWriter != NULL)
{
TransWriter->IncreaseRefCounter();