From db3e166503386b4f9e456017fd56d8bce84528fe Mon Sep 17 00:00:00 2001 From: Bryan Ischo Date: Mon, 9 Mar 2009 09:56:13 +1300 Subject: Look in target-list first to resolve dependencies This fixes a bug introduced by my previous changes which changes the behavior of IgnorePkg/IgnoreGroup to allow the user to remove unresolvable packages from the transaction. The bug is that the target-list was no longer being consulted first to resolve dependencies, which means that if two packages in the sync database satisfied a dependency, and the user explicitly requested one of those two packages in the sync, the other package was still being pulled in. A new test was added, sync993.py, to verify the desired behavior. Signed-off-by: Bryan Ischo Signed-off-by: Dan McGee --- lib/libalpm/deps.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/deps.h') diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h index eb1400bd..94847d8d 100644 --- a/lib/libalpm/deps.h +++ b/lib/libalpm/deps.h @@ -49,7 +49,8 @@ alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, int reverse); void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit); pmpkg_t *_alpm_resolvedep(pmdepend_t *dep, alpm_list_t *dbs, alpm_list_t *excluding, int prompt); int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *pkg, - alpm_list_t **packages, alpm_list_t *remove, alpm_list_t **data); + alpm_list_t *preferred, alpm_list_t **packages, alpm_list_t *remove, + alpm_list_t **data); int _alpm_dep_edge(pmpkg_t *pkg1, pmpkg_t *pkg2); pmdepend_t *_alpm_splitdep(const char *depstring); pmpkg_t *_alpm_find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep); -- cgit v1.2.3-24-g4f1b