Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-21 00:24:36 -0500
committerDan McGee <dan@archlinux.org>2011-03-21 07:40:13 -0500
commitfd3acff5e6b587c0fab04c2c3a34a1285e398a11 (patch)
tree6d4f568908784ee3147a853f266d691ac8e5c659
parentd3b32a68fe7de022df998c37b2bbe7e053d06dfb (diff)
Restore --debug/--verbose output without a primary operation
This is by no means a guarantee of this behavior remaining the same in the future, but it is easy enough to do what we used to in this case by delaying any sort of error condition until after we are completely done parsing options. Addresses FS#23370. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/pacman.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 591b2a00..fc34f0e9 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -740,7 +740,8 @@ static int parseargs(int argc, char *argv[])
} else if(opt == '?') {
/* this should have failed during first pass already */
return(1);
- } else if(parsearg_op(opt, 1) == 0) { /* opt is an operation */
+ } else if(parsearg_op(opt, 1) == 0) {
+ /* opt is an operation */
continue;
}
@@ -757,18 +758,17 @@ static int parseargs(int argc, char *argv[])
case PM_OP_SYNC:
result = parsearg_sync(opt);
break;
- case PM_OP_DEPTEST:
- result = 1;
- break;
case PM_OP_UPGRADE:
result = parsearg_upgrade(opt);
break;
+ case PM_OP_DEPTEST:
default:
- pm_printf(PM_LOG_ERROR, _("no operation specified (use -h for help)\n"));
- return(1);
+ result = 1;
+ break;
}
- if (result == 0)
+ if (result == 0) {
continue;
+ }
/* fall back to global options */
result = parsearg_global(opt);