From a1e57cbec8209b64ee40fdae5990e870c8203cd7 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 15 Jul 2007 12:44:18 -0400 Subject: 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 --- src/pacman/pacman.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/pacman/pacman.c') 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 -- cgit v1.2.3