From 0d2600c575033774485f84ad67cbc602592237ab Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 11 Oct 2011 12:35:33 -0500 Subject: Remove -f short option for --force This is not something that should be used on a frequent basis, and giving it a short option encourages use without making the drawbacks obvious. For the 1% of situations that require it, the 5 extra keystrokes are a fair price to pay. Signed-off-by: Dan McGee --- src/pacman/conf.h | 3 ++- src/pacman/pacman.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/pacman/conf.h b/src/pacman/conf.h index 9e14925a..325fbb64 100644 --- a/src/pacman/conf.h +++ b/src/pacman/conf.h @@ -128,7 +128,8 @@ enum { OP_PRINTFORMAT, OP_GPGDIR, OP_RECURSIVE, - OP_DBONLY + OP_DBONLY, + OP_FORCE }; /* clean method */ diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index ac793dfc..fa35e8de 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -177,7 +177,7 @@ static void usage(int op, const char * const myname) switch(op) { case PM_OP_SYNC: case PM_OP_UPGRADE: - addlist(_(" -f, --force force install, overwrite conflicting files\n")); + addlist(_(" --force force install, overwrite conflicting files\n")); addlist(_(" --asdeps install packages as non-explicitly installed\n")); addlist(_(" --asexplicit install packages as explicitly installed\n")); addlist(_(" --ignore ignore a package upgrade (can be used more than once)\n")); @@ -530,7 +530,7 @@ static int parsearg_upgrade(int opt) if(parsearg_trans(opt) == 0) return 0; switch(opt) { - case 'f': config->flags |= ALPM_TRANS_FLAG_FORCE; break; + case OP_FORCE: config->flags |= ALPM_TRANS_FLAG_FORCE; break; case OP_ASDEPS: config->flags |= ALPM_TRANS_FLAG_ALLDEPS; break; case OP_ASEXPLICIT: config->flags |= ALPM_TRANS_FLAG_ALLEXPLICIT; break; case OP_NEEDED: config->flags |= ALPM_TRANS_FLAG_NEEDED; break; @@ -596,7 +596,6 @@ static int parseargs(int argc, char *argv[]) {"nodeps", no_argument, 0, 'd'}, {"deps", no_argument, 0, 'd'}, {"explicit", no_argument, 0, 'e'}, - {"force", no_argument, 0, 'f'}, {"groups", no_argument, 0, 'g'}, {"help", no_argument, 0, 'h'}, {"info", no_argument, 0, 'i'}, @@ -622,6 +621,7 @@ static int parseargs(int argc, char *argv[]) {"config", required_argument, 0, OP_CONFIG}, {"ignore", required_argument, 0, OP_IGNORE}, {"debug", optional_argument, 0, OP_DEBUG}, + {"force", no_argument, 0, OP_FORCE}, {"noprogressbar", no_argument, 0, OP_NOPROGRESSBAR}, {"noscriptlet", no_argument, 0, OP_NOSCRIPTLET}, {"ask", required_argument, 0, OP_ASK}, -- cgit v1.2.3-24-g4f1b