summaryrefslogtreecommitdiff
path: root/cmdline/apt-mark.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-08-17 09:18:36 +0200
committerMichael Vogt <mvo@debian.org>2013-08-17 09:18:36 +0200
commitf49d103adc47c5c34f4ca852605ee55710e486b9 (patch)
treeeb63a4d80a82b2d9f9aa5bc25165a21cb38b215f /cmdline/apt-mark.cc
parentb55e706a8794d810fb7c5a7c175c04ea207b1ce7 (diff)
parentdd4d9729975fc2de37cd69220bc05efb16badc77 (diff)
Merge remote-tracking branch 'mvo/feature/apt-binary2' into debian/sid
Conflicts: cmdline/apt-get.cc
Diffstat (limited to 'cmdline/apt-mark.cc')
-rw-r--r--cmdline/apt-mark.cc21
1 files changed, 5 insertions, 16 deletions
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index 4c0fc2893..eb3410be1 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -24,6 +24,8 @@
#include <sys/wait.h>
#include <fcntl.h>
+#include <apt-private/private-cmndline.h>
+
#include <apti18n.h>
/*}}}*/
using namespace std;
@@ -400,21 +402,6 @@ bool ShowHelp(CommandLine &CmdL)
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
- CommandLine::Args Args[] = {
- {'h',"help","help",0},
- {0,"version","version",0},
- {'q',"quiet","quiet",CommandLine::IntLevel},
- {'q',"silent","quiet",CommandLine::IntLevel},
- {'v',"verbose","APT::MarkAuto::Verbose",0},
- {'s',"simulate","APT::Mark::Simulate",0},
- {'s',"just-print","APT::Mark::Simulate",0},
- {'s',"recon","APT::Mark::Simulate",0},
- {'s',"dry-run","APT::Mark::Simulate",0},
- {'s',"no-act","APT::Mark::Simulate",0},
- {'f',"file","Dir::State::extended_states",CommandLine::HasArg},
- {'c',"config-file",0,CommandLine::ConfigFile},
- {'o',"option",0,CommandLine::ArbItem},
- {0,0,0,0}};
CommandLine::Dispatch Cmds[] = {{"help",&ShowHelp},
{"auto",&DoAuto},
{"manual",&DoAuto},
@@ -432,12 +419,14 @@ int main(int argc,const char *argv[]) /*{{{*/
{"unmarkauto", &DoMarkAuto},
{0,0}};
+ std::vector<CommandLine::Args> Args = getCommandArgs("apt-mark", CommandLine::GetCommand(Cmds, argc, argv));
+
// Set up gettext support
setlocale(LC_ALL,"");
textdomain(PACKAGE);
// Parse the command line and initialize the package library
- CommandLine CmdL(Args,_config);
+ CommandLine CmdL(Args.data(),_config);
if (pkgInitConfig(*_config) == false ||
CmdL.Parse(argc,argv) == false ||
pkgInitSystem(*_config,_system) == false)