summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@petra.hos.u-szeged.hu>2007-06-10 00:48:56 +0200
committerDan McGee <dan@archlinux.org>2007-06-10 17:20:12 -0400
commit970f15d83288d55bdb0c3cc1f55ff4b8428512ae (patch)
tree11e5acd2d0e0604ed6981e96a9e71325cf7db4f9 /lib/libalpm
parentda6b175d01b63b839415bcfe3b9c8eeaddf16230 (diff)
downloadpacman-970f15d83288d55bdb0c3cc1f55ff4b8428512ae.tar.xz
Fix breakage in checkdeps when upgrading a multiple-depend
Fixes pactest upgrade059. Posted on the ML in the following messages: http://archlinux.org/pipermail/pacman-dev/2007-April/008127.html http://archlinux.org/pipermail/pacman-dev/2007-April/008129.html Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/deps.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index b6f8cc80..2a441d3c 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -270,12 +270,9 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
for(l = _alpm_db_get_pkgcache(db); l; l = l->next) {
pmpkg_t *pkg = l->data;
- if(strcmp(alpm_pkg_get_name(pkg), alpm_pkg_get_name(oldpkg)) == 0) {
- /* well, we know this one succeeds, but we're removing it... skip it */
- continue;
- }
-
- if(alpm_depcmp(pkg, depend)) {
+ if(alpm_depcmp(pkg, depend) && !_alpm_pkg_find(alpm_pkg_get_name(pkg), packages)) {
+ /* we ignore packages that will be updated because we know
+ * that the updated ones don't satisfy depend */
_alpm_log(PM_LOG_DEBUG, _("checkdeps: dependency '%s' satisfied by installed package '%s'"),
depend->name, alpm_pkg_get_name(pkg));
satisfied = 1;