summaryrefslogtreecommitdiff
path: root/cmdline/apt-mark.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-04-01 13:57:22 +0200
committerMichael Vogt <mvo@debian.org>2014-04-01 13:57:22 +0200
commit8a1c9010137a8c49d9808f2db34b9ee277138986 (patch)
tree5ec5c0103cb896407d8c9542fac0ec8ab3313602 /cmdline/apt-mark.cc
parentfa55ccaa85ca8f85251300f5c5f574edc0c3ca71 (diff)
parent417e83d0d79637266e04c98189c62ce85bcdf737 (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: apt-pkg/deb/dpkgpm.cc debian/apt.auto-removal.sh debian/changelog vendor/debian/sources.list.in
Diffstat (limited to 'cmdline/apt-mark.cc')
-rw-r--r--cmdline/apt-mark.cc41
1 files changed, 26 insertions, 15 deletions
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index d3a3a780b..ed348358a 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -11,20 +11,31 @@
#include <apt-pkg/cacheset.h>
#include <apt-pkg/cmndline.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/init.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
+
+#include <apt-private/private-cmndline.h>
-#include <algorithm>
#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
#include <fcntl.h>
-
-#include <apt-private/private-cmndline.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <algorithm>
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
@@ -35,7 +46,7 @@ ostream c1out(0);
ostream c2out(0);
ofstream devnull("/dev/null");
/* DoAuto - mark packages as automatically/manually installed {{{*/
-bool DoAuto(CommandLine &CmdL)
+static bool DoAuto(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -82,7 +93,7 @@ bool DoAuto(CommandLine &CmdL)
/* DoMarkAuto - mark packages as automatically/manually installed {{{*/
/* Does the same as DoAuto but tries to do it exactly the same why as
the python implementation did it so it can be a drop-in replacement */
-bool DoMarkAuto(CommandLine &CmdL)
+static bool DoMarkAuto(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -119,7 +130,7 @@ bool DoMarkAuto(CommandLine &CmdL)
}
/*}}}*/
/* ShowAuto - show automatically installed packages (sorted) {{{*/
-bool ShowAuto(CommandLine &CmdL)
+static bool ShowAuto(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -159,7 +170,7 @@ bool ShowAuto(CommandLine &CmdL)
}
/*}}}*/
/* DoHold - mark packages as hold by dpkg {{{*/
-bool DoHold(CommandLine &CmdL)
+static bool DoHold(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -335,7 +346,7 @@ bool DoHold(CommandLine &CmdL)
}
/*}}}*/
/* ShowHold - show packages set on hold in dpkg status {{{*/
-bool ShowHold(CommandLine &CmdL)
+static bool ShowHold(CommandLine &CmdL)
{
pkgCacheFile CacheFile;
pkgCache *Cache = CacheFile.GetPkgCache();
@@ -372,7 +383,7 @@ bool ShowHold(CommandLine &CmdL)
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-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__);