[pacman-dev] handling of provides/conflicts packages
James Rosten
seinfeld90 at gmail.com
Thu Mar 29 19:27:10 EDT 2007
This should fix the wording problem. If it doesn't please smack me
'cause this is the second time I've gone about "fixing" it.
Patch is below (git style :P).
~ Jamie / yankees26
>From 646ad0429121a4b37033e43ac713d07bdedf6e60 Mon Sep 17 00:00:00 2001
From: James Rosten <seinfeld90 at gmail.com>
Date: Thu, 29 Mar 2007 19:23:46 -0400
Subject: [PATCH] Fixing a wording problem describing dependencies.
Signed-off-by: James Rosten <seinfeld90 at gmail.com>
---
lib/libalpm/alpm.h | 1 +
lib/libalpm/deps.c | 4 ++--
src/pacman/sync.c | 9 +++++++--
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 954cf96..20f7366 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -372,6 +372,7 @@ typedef enum _pmdepmod_t {
typedef enum _pmdeptype_t {
PM_DEP_TYPE_DEPEND = 1,
+ PM_DEP_TYPE_REQUIRED,
PM_DEP_TYPE_CONFLICT
} pmdeptype_t;
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 137be64..55097ed 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -288,7 +288,7 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
if(!satisfied) {
_alpm_log(PM_LOG_DEBUG, _("checkdeps: updated '%s' won't satisfy a dependency of '%s'"),
alpm_pkg_get_name(oldpkg), alpm_pkg_get_name(p));
- miss = _alpm_depmiss_new(p->name, PM_DEP_TYPE_DEPEND, depend->mod,
+ miss = _alpm_depmiss_new(p->name, PM_DEP_TYPE_REQUIRED, depend->mod,
depend->name, depend->version);
if(!_alpm_depmiss_isin(miss, baddeps)) {
baddeps = alpm_list_add(baddeps, miss);
@@ -408,7 +408,7 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
if(!found) {
_alpm_log(PM_LOG_DEBUG, _("checkdeps: found %s as required by %s"),
reqname, alpm_pkg_get_name(tp));
- miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), PM_DEP_TYPE_DEPEND,
+ miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), PM_DEP_TYPE_REQUIRED,
PM_DEP_MOD_ANY, j->data, NULL);
if(!_alpm_depmiss_isin(miss, baddeps)) {
baddeps = alpm_list_add(baddeps, miss);
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index ca95fe6..d65be25 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -618,8 +618,13 @@ int pacman_sync(alpm_list_t *targets)
case PM_ERR_UNSATISFIED_DEPS:
for(i = data; i; i = alpm_list_next(i)) {
pmdepmissing_t *miss = alpm_list_getdata(i);
- MSG(NL, ":: %s %s %s", alpm_dep_get_target(miss), _("requires"),
- alpm_dep_get_name(miss));
+ if ( alpm_dep_get_type(miss) == PM_DEP_TYPE_DEPEND ) {
+ MSG(NL, ":: %s %s %s", alpm_dep_get_target(miss), _("requires"),
+ alpm_dep_get_name(miss));
+ } else {
+ MSG(NL, ":: %s %s %s", alpm_dep_get_name(miss), _("requires"),
+ alpm_dep_get_target(miss));
+ }
switch(alpm_dep_get_mod(miss)) {
case PM_DEP_MOD_ANY:
break;
--
1.5.0.3
More information about the pacman-dev
mailing list