From eada558e12da1fd605d8c7401ec3c17a37fed9a9 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Mon, 17 May 2010 02:33:28 +0200 Subject: Partial fix for the phonon/qt issue This patch fixes the phonon/qt issue, if all to-be-upgraded packages are explicit targets (ie. only not-yet-installed packages are pulled by resolvedeps). This condition covers the most common situations, for example it should hold with every -Su operation. After this patch sync405.py passes, but sync406.py doesn't. The work is inspired by the patch of Henning Garus, thanks for his work: http://mailman.archlinux.org/pipermail/pacman-dev/2010-February/010429.html (I moved the alpm_list_diff computation to sync.c in order to compute it only once.) Signed-off-by: Nagy Gabor Signed-off-by: Dan McGee --- lib/libalpm/sync.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/sync.c') diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 6b625ed6..be36941f 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -431,17 +431,21 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync } } + /* Compute the fake local database for resolvedeps (partial fix for the phonon/qt issue) */ + alpm_list_t *localpkgs = alpm_list_diff(_alpm_db_get_pkgcache(db_local), trans->add, _alpm_pkg_cmp); + /* Resolve packages in the transaction one at a time, in addtion building up a list of packages which could not be resolved. */ for(i = trans->add; i; i = i->next) { pmpkg_t *pkg = i->data; - if(_alpm_resolvedeps(db_local, dbs_sync, pkg, trans->add, + if(_alpm_resolvedeps(localpkgs, dbs_sync, pkg, trans->add, &resolved, remove, data) == -1) { unresolvable = alpm_list_add(unresolvable, pkg); } /* Else, [resolved] now additionally contains [pkg] and all of its dependencies not already on the list */ } + alpm_list_free(localpkgs); /* If there were unresolvable top-level packages, prompt the user to see if they'd like to ignore them rather than failing the sync */ -- cgit v1.2.3-24-g4f1b