summaryrefslogtreecommitdiff
path: root/src/pacman/deptest.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-15 19:34:52 +0000
committerAaron Griffin <aaron@archlinux.org>2006-10-15 19:34:52 +0000
commit3f27542156125118800235c5ac1bac125fd7752c (patch)
treee0ba3d5fd23be2c7ad5da14234622b032ab79191 /src/pacman/deptest.c
parentd37ad048732fbcef38aec001993553896dbe4198 (diff)
downloadpacman-3f27542156125118800235c5ac1bac125fd7752c.tar.xz
Merged frugalware changes. Added a few other minor things too, but there's alot
to list. The diff should show you 8)
Diffstat (limited to 'src/pacman/deptest.c')
-rw-r--r--src/pacman/deptest.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c
index 425bd1da..4f6723e7 100644
--- a/src/pacman/deptest.c
+++ b/src/pacman/deptest.c
@@ -58,11 +58,11 @@ int pacman_deptest(list_t *targets)
/* 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) == -1) {
+ if(alpm_trans_init(PM_TRANS_TYPE_ADD, 0, NULL, NULL, NULL) == -1) {
ERR(NL, "%s", alpm_strerror(pm_errno));
if(pm_errno == PM_ERR_HANDLE_LOCK) {
MSG(NL, _(" if you're sure a package manager is not already running,\n"
- " you can remove %s\n"), PM_LOCK);
+ " you can remove %s%s\n"), config->root, PM_LOCK);
}
return(1);
}
@@ -108,7 +108,7 @@ int pacman_deptest(list_t *targets)
PM_DEPMISS *miss = alpm_list_getdata(lp);
if(!config->op_d_resolve) {
MSG(NL, _("requires: %s"), alpm_dep_getinfo(miss, PM_DEP_NAME));
- switch((int)alpm_dep_getinfo(miss, PM_DEP_MOD)) {
+ switch((long)alpm_dep_getinfo(miss, PM_DEP_MOD)) {
case PM_DEP_MOD_EQ: MSG(CL, "=%s", alpm_dep_getinfo(miss, PM_DEP_VERSION)); break;
case PM_DEP_MOD_GE: MSG(CL, ">=%s", alpm_dep_getinfo(miss, PM_DEP_VERSION)); break;
case PM_DEP_MOD_LE: MSG(CL, "<=%s", alpm_dep_getinfo(miss, PM_DEP_VERSION)); break;
@@ -153,9 +153,11 @@ int pacman_deptest(list_t *targets)
}
cleanup:
- if(alpm_trans_release() == -1) {
- ERR(NL, _("could not release transaction (%s)"), alpm_strerror(pm_errno));
- retval = 1;
+ if(!config->op_d_resolve) {
+ if(alpm_trans_release() == -1) {
+ ERR(NL, _("could not release transaction (%s)"), alpm_strerror(pm_errno));
+ retval = 1;
+ }
}
return(retval);