Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2021-01-19 10:30:04 -0800
committerAllan McRae <allan@archlinux.org>2021-01-21 17:18:04 +1000
commit84f9cb021e5244118d09752e725c1c2956d4281c (patch)
treeb67db80fcf2ddc5b1d3db2431a028cdd1db256f2 /src
parent05aefb8f82d856626598ef6a3f49ff8d5f623bf5 (diff)
pacman: add -w to -U
Mostly for testing. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-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 3045a58e..cc280d41 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -161,7 +161,6 @@ static void usage(int op, const char * const myname)
addlist(_(" -q, --quiet show less information for query and search\n"));
addlist(_(" -s, --search <regex> search remote repositories for matching strings\n"));
addlist(_(" -u, --sysupgrade upgrade installed packages (-uu enables downgrades)\n"));
- addlist(_(" -w, --downloadonly download packages but do not install/upgrade anything\n"));
addlist(_(" -y, --refresh download fresh package databases from the server\n"
" (-yy to force a refresh even if up to date)\n"));
addlist(_(" --needed do not reinstall up to date packages\n"));
@@ -189,6 +188,7 @@ static void usage(int op, const char * const myname)
switch(op) {
case PM_OP_SYNC:
case PM_OP_UPGRADE:
+ addlist(_(" -w, --downloadonly download packages but do not install/upgrade anything\n"));
addlist(_(" --overwrite <glob>\n"
" overwrite conflicting files (can be used more than once)\n"));
addlist(_(" --asdeps install packages as non-explicitly installed\n"));
@@ -735,6 +735,12 @@ static int parsearg_upgrade(int opt)
case OP_IGNOREGROUP:
parsearg_util_addlist(&(config->ignoregrp));
break;
+ case OP_DOWNLOADONLY:
+ case 'w':
+ config->op_s_downloadonly = 1;
+ config->flags |= ALPM_TRANS_FLAG_DOWNLOADONLY;
+ config->flags |= ALPM_TRANS_FLAG_NOCONFLICTS;
+ break;
default: return 1;
}
return 0;
@@ -820,12 +826,6 @@ static int parsearg_sync(int opt)
case 'u':
(config->op_s_upgrade)++;
break;
- case OP_DOWNLOADONLY:
- case 'w':
- config->op_s_downloadonly = 1;
- config->flags |= ALPM_TRANS_FLAG_DOWNLOADONLY;
- config->flags |= ALPM_TRANS_FLAG_NOCONFLICTS;
- break;
case OP_REFRESH:
case 'y':
(config->op_s_sync)++;