summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/deps.c
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2010-05-17 02:33:28 +0200
committerDan McGee <dan@archlinux.org>2010-05-18 11:33:00 -0500
commiteada558e12da1fd605d8c7401ec3c17a37fed9a9 (patch)
treee6f20cb33c4a1a110c8fe4ba65a6dcbd2de89084 /lib/libalpm/deps.c
parentc6f0fc27eda31943e10e2a89e221796efb87dce9 (diff)
downloadpacman-eada558e12da1fd605d8c7401ec3c17a37fed9a9.tar.xz
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 <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/deps.c')
-rw-r--r--lib/libalpm/deps.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 7dc734de..26f9b16d 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -578,7 +578,7 @@ pmpkg_t *_alpm_resolvedep(pmdepend_t *dep, alpm_list_t *dbs,
/* Computes resolvable dependencies for a given package and adds that package
* and those resolvable dependencies to a list.
*
- * @param local is the local database
+ * @param localpkgs is the list of local packages
* @param dbs_sync are the sync databases
* @param pkg is the package to resolve
* @param packages is a pointer to a list of packages which will be
@@ -594,7 +594,7 @@ pmpkg_t *_alpm_resolvedep(pmdepend_t *dep, alpm_list_t *dbs,
* unresolvable dependency, in which case the [*packages] list will be
* unmodified by this function
*/
-int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *pkg,
+int _alpm_resolvedeps(alpm_list_t *localpkgs, alpm_list_t *dbs_sync, pmpkg_t *pkg,
alpm_list_t *preferred, alpm_list_t **packages,
alpm_list_t *remove, alpm_list_t **data)
{
@@ -605,10 +605,6 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *pkg,
ALPM_LOG_FUNC;
- if(local == NULL) {
- return(-1);
- }
-
if(_alpm_pkg_find(*packages, pkg->name) != NULL) {
return(0);
}
@@ -624,7 +620,7 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *pkg,
for(i = alpm_list_last(*packages); i; i = i->next) {
pmpkg_t *tpkg = i->data;
targ = alpm_list_add(NULL, tpkg);
- deps = alpm_checkdeps(_alpm_db_get_pkgcache(local), 0, remove, targ);
+ deps = alpm_checkdeps(localpkgs, 0, remove, targ);
alpm_list_free(targ);
for(j = deps; j; j = j->next) {
pmdepmissing_t *miss = j->data;