Date: Monday, February 12, 2007 @ 01:44:00 Author: aaron Path: /home/cvs-pacman/pacman-lib/src/pacman Modified: conf.h (1.15 -> 1.16) deptest.c (1.13 -> 1.14) pacman.c (1.91 -> 1.92) * Removed the 'vercmp' op from pacman. The standalone 'vercmp' binary should be used instead * Allow -T/--deptest to work without root privileges -----------+ conf.h | 1 - deptest.c | 12 ------------ pacman.c | 6 ++---- 3 files changed, 2 insertions(+), 17 deletions(-) Index: pacman-lib/src/pacman/conf.h diff -u pacman-lib/src/pacman/conf.h:1.15 pacman-lib/src/pacman/conf.h:1.16 --- pacman-lib/src/pacman/conf.h:1.15 Sun Feb 4 03:26:53 2007 +++ pacman-lib/src/pacman/conf.h Mon Feb 12 01:44:00 2007 @@ -33,7 +33,6 @@ unsigned short upgrade; unsigned short noconfirm; unsigned short noprogressbar; - unsigned short op_d_vertest; unsigned short op_d_resolve; unsigned short op_q_isfile; unsigned short op_q_info; Index: pacman-lib/src/pacman/deptest.c diff -u pacman-lib/src/pacman/deptest.c:1.13 pacman-lib/src/pacman/deptest.c:1.14 --- pacman-lib/src/pacman/deptest.c:1.13 Wed Jan 31 01:10:22 2007 +++ pacman-lib/src/pacman/deptest.c Mon Feb 12 01:44:00 2007 @@ -49,18 +49,6 @@ return(0); } - if(config->op_d_vertest) { - const char *pkga, *pkgb; - pkga = alpm_list_getdata(targets); - i = alpm_list_next(targets); - if(pkga && i && (pkgb = alpm_list_getdata(i))) { - int ret = alpm_pkg_vercmp(pkga, pkgb); - printf("%d\n", ret); - return(ret); - } - return(0); - } - /* we create a transaction to hold a dummy package to be able to use * deps checkings from alpm_trans_prepare() */ if(alpm_trans_init(PM_TRANS_TYPE_ADD, 0, NULL, NULL, NULL) == -1) { Index: pacman-lib/src/pacman/pacman.c diff -u pacman-lib/src/pacman/pacman.c:1.91 pacman-lib/src/pacman/pacman.c:1.92 --- pacman-lib/src/pacman/pacman.c:1.91 Fri Feb 9 12:58:19 2007 +++ pacman-lib/src/pacman/pacman.c Mon Feb 12 01:44:00 2007 @@ -183,7 +183,7 @@ && (pm_errno == PM_ERR_TRANS_COMMITING)) { return; } - if(signum != 0 && config->op_d_vertest == 0) { + if(signum != 0) { /* TODO why is this here? */ fprintf(stderr, "\n"); } @@ -224,7 +224,6 @@ {"deptest", no_argument, 0, 'T'}, /* used by makepkg */ {"upgrade", no_argument, 0, 'U'}, {"version", no_argument, 0, 'V'}, - {"vertest", no_argument, 0, 'Y'}, /* does the same as the 'vercmp' binary */ {"dbpath", required_argument, 0, 'b'}, {"cascade", no_argument, 0, 'c'}, {"changelog", no_argument, 0, 'c'}, @@ -328,7 +327,6 @@ case 'V': config->version = 1; break; case 'Y': config->op = (config->op != PM_OP_MAIN ? 0 : PM_OP_DEPTEST); - config->op_d_vertest = 1; break; case 'b': if(stat(optarg, &st) == -1 || !S_ISDIR(st.st_mode)) { @@ -479,7 +477,7 @@ 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 && config->op_d_resolve) || (strcmp(alpm_option_get_root(), PM_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