summaryrefslogtreecommitdiff
path: root/ftparchive/apt-ftparchive.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-05-07 17:55:10 +0200
committerMichael Vogt <mvo@debian.org>2014-05-07 17:55:10 +0200
commit38d2959ffb8c6f5f291b2910014a67b1b352ab4c (patch)
treec5977b8f34aaf973ed3956952ec3ff43ac59f143 /ftparchive/apt-ftparchive.cc
parentfce69e7a0f38299c57ef96ae1c1dd9a5379bfd5a (diff)
parent3fa4e98f62e469f4292d2811b4e15f4afb678fbd (diff)
Merge branch 'debian/sid' into debian/experimental
Conflicts: apt-pkg/cachefilter.h apt-pkg/contrib/fileutl.cc apt-pkg/contrib/netrc.h apt-pkg/deb/debsrcrecords.cc apt-pkg/init.h apt-pkg/pkgcache.cc debian/apt.install.in debian/changelog
Diffstat (limited to 'ftparchive/apt-ftparchive.cc')
-rw-r--r--ftparchive/apt-ftparchive.cc37
1 files changed, 23 insertions, 14 deletions
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index 712f8469a..692f19e25 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -17,14 +17,23 @@
#include <apt-pkg/cmndline.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/init.h>
-#include <algorithm>
+#include <apt-pkg/fileutl.h>
+#include <algorithm>
#include <climits>
#include <sys/time.h>
-#include <regex.h>
-
+#include <locale.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <time.h>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include "cachedb.h"
+#include "override.h"
#include "apt-ftparchive.h"
-#include "contents.h"
#include "multicompress.h"
#include "writer.h"
@@ -438,7 +447,7 @@ bool PackageMap::GenContents(Configuration &Setup,
// ---------------------------------------------------------------------
/* This populates the PkgList with all the possible permutations of the
section/arch lists. */
-void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
+static void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
{
// Load the defaults
string DDir = Setup.Find("TreeDefault::Directory",
@@ -484,7 +493,7 @@ void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
struct SubstVar const Vars[] = {{"$(DIST)",&Dist},
{"$(SECTION)",&Section},
{"$(ARCH)",&Arch},
- {}};
+ {NULL, NULL}};
mode_t const Perms = Block.FindI("FileMode", Permissions);
bool const LongDesc = Block.FindB("LongDescription", LongDescription);
TranslationWriter *TransWriter;
@@ -550,7 +559,7 @@ void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
// LoadBinDir - Load a 'bindirectory' section from the Generate Config /*{{{*/
// ---------------------------------------------------------------------
/* */
-void LoadBinDir(vector<PackageMap> &PkgList,Configuration &Setup)
+static void LoadBinDir(vector<PackageMap> &PkgList,Configuration &Setup)
{
mode_t const Permissions = Setup.FindI("Default::FileMode",0644);
@@ -586,7 +595,7 @@ void LoadBinDir(vector<PackageMap> &PkgList,Configuration &Setup)
// ShowHelp - Show the help text /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &)
{
ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
@@ -639,7 +648,7 @@ bool ShowHelp(CommandLine &CmdL)
// SimpleGenPackages - Generate a Packages file for a directory tree /*{{{*/
// ---------------------------------------------------------------------
/* This emulates dpkg-scanpackages's command line interface. 'mostly' */
-bool SimpleGenPackages(CommandLine &CmdL)
+static bool SimpleGenPackages(CommandLine &CmdL)
{
if (CmdL.FileSize() < 2)
return ShowHelp(CmdL);
@@ -667,7 +676,7 @@ bool SimpleGenPackages(CommandLine &CmdL)
// SimpleGenContents - Generate a Contents listing /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool SimpleGenContents(CommandLine &CmdL)
+static bool SimpleGenContents(CommandLine &CmdL)
{
if (CmdL.FileSize() < 2)
return ShowHelp(CmdL);
@@ -689,7 +698,7 @@ bool SimpleGenContents(CommandLine &CmdL)
// SimpleGenSources - Generate a Sources file for a directory tree /*{{{*/
// ---------------------------------------------------------------------
/* This emulates dpkg-scanpackages's command line interface. 'mostly' */
-bool SimpleGenSources(CommandLine &CmdL)
+static bool SimpleGenSources(CommandLine &CmdL)
{
if (CmdL.FileSize() < 2)
return ShowHelp(CmdL);
@@ -722,7 +731,7 @@ bool SimpleGenSources(CommandLine &CmdL)
/*}}}*/
// SimpleGenRelease - Generate a Release file for a directory tree /*{{{*/
// ---------------------------------------------------------------------
-bool SimpleGenRelease(CommandLine &CmdL)
+static bool SimpleGenRelease(CommandLine &CmdL)
{
if (CmdL.FileSize() < 2)
return ShowHelp(CmdL);
@@ -747,7 +756,7 @@ bool SimpleGenRelease(CommandLine &CmdL)
// Generate - Full generate, using a config file /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool Generate(CommandLine &CmdL)
+static bool Generate(CommandLine &CmdL)
{
struct CacheDB::Stats SrcStats;
if (CmdL.FileSize() < 2)
@@ -911,7 +920,7 @@ bool Generate(CommandLine &CmdL)
// Clean - Clean out the databases /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool Clean(CommandLine &CmdL)
+static bool Clean(CommandLine &CmdL)
{
if (CmdL.FileSize() != 2)
return ShowHelp(CmdL);