~ubuntu-branches/ubuntu/trusty/apt/trusty

« back to all changes in this revision

Viewing changes to cmdline/apt-mark.cc

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-04-01 17:48:58 UTC
  • mfrom: (1.4.87 sid)
  • Revision ID: package-import@ubuntu.com-20140401174858-4mv29mm29zu22fn1
Tags: 1.0.1ubuntu1
merge with the debian/sid 1.0.1 version
(LP: #1302033)

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#include <apt-pkg/cacheset.h>
12
12
#include <apt-pkg/cmndline.h>
13
13
#include <apt-pkg/error.h>
 
14
#include <apt-pkg/fileutl.h>
14
15
#include <apt-pkg/init.h>
 
16
#include <apt-pkg/pkgsystem.h>
15
17
#include <apt-pkg/strutl.h>
16
 
#include <apt-pkg/pkgsystem.h>
17
 
#include <apt-pkg/fileutl.h>
18
 
 
19
 
#include <algorithm>
 
18
#include <apt-pkg/cacheiterators.h>
 
19
#include <apt-pkg/configuration.h>
 
20
#include <apt-pkg/depcache.h>
 
21
#include <apt-pkg/macros.h>
 
22
#include <apt-pkg/pkgcache.h>
 
23
 
 
24
#include <apt-private/private-cmndline.h>
 
25
 
20
26
#include <errno.h>
 
27
#include <fcntl.h>
 
28
#include <stddef.h>
 
29
#include <stdio.h>
 
30
#include <stdlib.h>
 
31
#include <string.h>
 
32
#include <sys/wait.h>
21
33
#include <unistd.h>
22
 
#include <sys/types.h>
23
 
#include <sys/stat.h>
24
 
#include <sys/wait.h>
25
 
#include <fcntl.h>
26
 
 
27
 
#include <apt-private/private-cmndline.h>
 
34
#include <algorithm>
 
35
#include <fstream>
 
36
#include <iostream>
 
37
#include <string>
 
38
#include <vector>
28
39
 
29
40
#include <apti18n.h>
30
41
                                                                        /*}}}*/
35
46
ostream c2out(0);
36
47
ofstream devnull("/dev/null");
37
48
/* DoAuto - mark packages as automatically/manually installed           {{{*/
38
 
bool DoAuto(CommandLine &CmdL)
 
49
static bool DoAuto(CommandLine &CmdL)
39
50
{
40
51
   pkgCacheFile CacheFile;
41
52
   pkgCache *Cache = CacheFile.GetPkgCache();
82
93
/* DoMarkAuto - mark packages as automatically/manually installed       {{{*/
83
94
/* Does the same as DoAuto but tries to do it exactly the same why as
84
95
   the python implementation did it so it can be a drop-in replacement */
85
 
bool DoMarkAuto(CommandLine &CmdL)
 
96
static bool DoMarkAuto(CommandLine &CmdL)
86
97
{
87
98
   pkgCacheFile CacheFile;
88
99
   pkgCache *Cache = CacheFile.GetPkgCache();
119
130
}
120
131
                                                                        /*}}}*/
121
132
/* ShowAuto - show automatically installed packages (sorted)            {{{*/
122
 
bool ShowAuto(CommandLine &CmdL)
 
133
static bool ShowAuto(CommandLine &CmdL)
123
134
{
124
135
   pkgCacheFile CacheFile;
125
136
   pkgCache *Cache = CacheFile.GetPkgCache();
159
170
}
160
171
                                                                        /*}}}*/
161
172
/* DoHold - mark packages as hold by dpkg                               {{{*/
162
 
bool DoHold(CommandLine &CmdL)
 
173
static bool DoHold(CommandLine &CmdL)
163
174
{
164
175
   pkgCacheFile CacheFile;
165
176
   pkgCache *Cache = CacheFile.GetPkgCache();
335
346
}
336
347
                                                                        /*}}}*/
337
348
/* ShowHold - show packages set on hold in dpkg status                  {{{*/
338
 
bool ShowHold(CommandLine &CmdL)
 
349
static bool ShowHold(CommandLine &CmdL)
339
350
{
340
351
   pkgCacheFile CacheFile;
341
352
   pkgCache *Cache = CacheFile.GetPkgCache();
372
383
// ShowHelp - Show a help screen                                        /*{{{*/
373
384
// ---------------------------------------------------------------------
374
385
/* */
375
 
bool ShowHelp(CommandLine &CmdL)
 
386
static bool ShowHelp(CommandLine &)
376
387
{
377
388
   ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
378
389
            COMMON_ARCH,__DATE__,__TIME__);