Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-07-15 12:44:18 -0400
committerDan McGee <dan@archlinux.org>2007-07-15 12:46:02 -0400
commita1e57cbec8209b64ee40fdae5990e870c8203cd7 (patch)
tree02b07ea6756c6694b367ad24b39e2457cd44a35a /src
parentc2920033d078768db08c338f4908033503abfc08 (diff)
Add --asdeps option to pacman
This replaces the former -D operation that was undocumented and rather hacky. It can be used with add, upgrade, or sync transactions and will affect all packages installed. Should close FS #7193. Also tell makepkg to use this new flag. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/conf.h1
-rw-r--r--src/pacman/pacman.c11
-rw-r--r--src/pacman/sync.c11
3 files changed, 12 insertions, 11 deletions
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index 252bb95a..60c116ad 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -36,7 +36,6 @@ typedef struct __config_t {
unsigned short logmask;
/* command line options */
- unsigned short op_d_resolve;
unsigned short op_q_isfile;
unsigned short op_q_info;
unsigned short op_q_list;
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 5281df65..549dfe9d 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -88,6 +88,7 @@ static void usage(int op, char *myname)
if(op == PM_OP_ADD) {
printf("%s: %s {-A --add} [%s] <%s>\n", str_usg, myname, str_opt, str_file);
printf("%s:\n", str_opt);
+ printf(_(" --asdeps install packages as non-explicitly installed\n"));
printf(_(" -d, --nodeps skip dependency checks\n"));
printf(_(" -f, --force force install, overwrite conflicting files\n"));
} else if(op == PM_OP_REMOVE) {
@@ -106,6 +107,7 @@ static void usage(int op, char *myname)
printf("%s: %s {-U --upgrade} [%s] <%s>\n", str_usg, myname, str_opt, str_file);
}
printf("%s:\n", str_opt);
+ printf(_(" --asdeps install packages as non-explicitly installed\n"));
printf(_(" -d, --nodeps skip dependency checks\n"));
printf(_(" -f, --force force install, overwrite conflicting files\n"));
} else if(op == PM_OP_QUERY) {
@@ -126,6 +128,7 @@ static void usage(int op, char *myname)
} else if(op == PM_OP_SYNC) {
printf("%s: %s {-S --sync} [%s] [%s]\n", str_usg, myname, str_opt, str_pkg);
printf("%s:\n", str_opt);
+ printf(_(" --asdeps install packages as non-explicitly installed\n"));
printf(_(" -c, --clean remove old packages from cache directory (-cc for all)\n"));
printf(_(" -d, --nodeps skip dependency checks\n"));
printf(_(" -e, --dependsonly install dependencies only\n"));
@@ -288,10 +291,11 @@ static int parseargs(int argc, char *argv[])
{"config", required_argument, 0, 1001},
{"ignore", required_argument, 0, 1002},
{"debug", optional_argument, 0, 1003},
- {"noprogressbar", no_argument, 0, 1004},
+ {"noprogressbar", no_argument, 0, 1004},
{"noscriptlet", no_argument, 0, 1005},
{"ask", required_argument, 0, 1006},
{"cachedir", required_argument, 0, 1007},
+ {"asdeps", no_argument, 0, 1008},
{0, 0, 0, 0}
};
struct stat st;
@@ -345,6 +349,9 @@ static int parseargs(int argc, char *argv[])
}
alpm_option_add_cachedir(optarg);
break;
+ case 1008:
+ config->flags |= PM_TRANS_FLAG_ALLDEPS;
+ break;
case 'A': config->op = (config->op != PM_OP_MAIN ? 0 : PM_OP_ADD); break;
case 'F':
config->op = (config->op != PM_OP_MAIN ? 0 : PM_OP_UPGRADE);
@@ -754,7 +761,7 @@ if(0) {
if((config->op == PM_OP_SYNC && !config->op_s_sync &&
(config->op_s_search || config->group || config->op_q_list || config->op_q_info
|| config->flags & PM_TRANS_FLAG_PRINTURIS))
- || (config->op == PM_OP_DEPTEST && config->op_d_resolve)
+ || config->op == PM_OP_DEPTEST
|| (strcmp(alpm_option_get_root(), "/") != 0)) {
/* special case: PM_OP_SYNC can be used w/ config->op_s_search by any user */
/* special case: ignore root user check if -r is specified, fall back on
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index d5888a57..77293709 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -704,16 +704,11 @@ int pacman_sync(alpm_list_t *targets)
confirm = yesno(_("Proceed with download? [Y/n] "));
}
} else {
- /* don't get any confirmation if we're called from makepkg */
- if(config->op_d_resolve) {
+ if(config->noconfirm) {
+ printf(_("Beginning upgrade process...\n"));
confirm = 1;
} else {
- if(config->noconfirm) {
- printf(_("Beginning upgrade process...\n"));
- confirm = 1;
- } else {
- confirm = yesno(_("Proceed with installation? [Y/n] "));
- }
+ confirm = yesno(_("Proceed with installation? [Y/n] "));
}
}
if(!confirm) {