summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/deps.c17
-rw-r--r--lib/libalpm/sync.c2
-rw-r--r--test/pacman/tests/sync134.py2
3 files changed, 13 insertions, 8 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index dca8877e..81d8f0dd 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -139,8 +139,8 @@ alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, int reverse)
vertex->state = -1;
int found = 0;
while(vertex->childptr && !found) {
- pmgraph_t *nextchild = (vertex->childptr)->data;
- vertex->childptr = (vertex->childptr)->next;
+ pmgraph_t *nextchild = vertex->childptr->data;
+ vertex->childptr = vertex->childptr->next;
if (nextchild->state == 0) {
found = 1;
nextchild->parent = vertex;
@@ -222,7 +222,7 @@ pmpkg_t SYMEXPORT *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstring)
* @param reversedeps handles the backward dependencies
* @param remove an alpm_list_t* of packages to be removed
* @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)
- * @return an alpm_list_t* of pmpkg_t* of missing_t pointers.
+ * @return an alpm_list_t* of pmpkg_t* of pmdepmissing_t pointers.
*/
alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
alpm_list_t *remove, alpm_list_t *upgrade)
@@ -230,7 +230,6 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
alpm_list_t *i, *j;
alpm_list_t *targets, *dblist = NULL, *modified = NULL;
alpm_list_t *baddeps = NULL;
- pmdepmissing_t *miss = NULL;
ALPM_LOG_FUNC;
@@ -258,6 +257,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
if(!_alpm_find_dep_satisfier(upgrade, depend) &&
!_alpm_find_dep_satisfier(dblist, depend)) {
/* Unsatisfied dependency in the upgrade list */
+ pmdepmissing_t *miss;
char *missdepstring = alpm_dep_compute_string(depend);
_alpm_log(PM_LOG_DEBUG, "checkdeps: missing dependency '%s' for package '%s'\n",
missdepstring, alpm_pkg_get_name(tp));
@@ -282,6 +282,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
if(causingpkg &&
!_alpm_find_dep_satisfier(upgrade, depend) &&
!_alpm_find_dep_satisfier(dblist, depend)) {
+ pmdepmissing_t *miss;
char *missdepstring = alpm_dep_compute_string(depend);
_alpm_log(PM_LOG_DEBUG, "checkdeps: transaction would break '%s' dependency of '%s'\n",
missdepstring, alpm_pkg_get_name(lp));
@@ -292,6 +293,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_list_t *pkglist, int reversedeps,
}
}
}
+
alpm_list_free(modified);
alpm_list_free(dblist);
@@ -692,14 +694,17 @@ int _alpm_resolvedeps(alpm_list_t *localpkgs, alpm_list_t *dbs_sync, pmpkg_t *pk
targ = alpm_list_add(NULL, tpkg);
deps = alpm_checkdeps(localpkgs, 0, remove, targ);
alpm_list_free(targ);
+
for(j = deps; j; j = j->next) {
pmdepmissing_t *miss = j->data;
pmdepend_t *missdep = alpm_miss_get_dep(miss);
- /* check if one of the packages in the [*packages] list already satisfies this dependency */
+ /* check if one of the packages in the [*packages] list already satisfies
+ * this dependency */
if(_alpm_find_dep_satisfier(*packages, missdep)) {
continue;
}
- /* check if one of the packages in the [preferred] list already satisfies this dependency */
+ /* check if one of the packages in the [preferred] list already satisfies
+ * this dependency */
pmpkg_t *spkg = _alpm_find_dep_satisfier(preferred, missdep);
if(!spkg) {
/* find a satisfier package in the given repositories */
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 859b8c94..a4dc755e 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -333,7 +333,7 @@ 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_list(db_local), trans->add, _alpm_pkg_cmp);
- /* Resolve packages in the transaction one at a time, in addtion
+ /* Resolve packages in the transaction one at a time, in addition
building up a list of packages which could not be resolved. */
for(i = trans->add; i; i = i->next) {
pmpkg_t *pkg = i->data;
diff --git a/test/pacman/tests/sync134.py b/test/pacman/tests/sync134.py
index 572ab326..ad58c8b7 100644
--- a/test/pacman/tests/sync134.py
+++ b/test/pacman/tests/sync134.py
@@ -1,4 +1,4 @@
-self.description = "Sysupgrade with a set of sync packages replacing a set local one"
+self.description = "Sysupgrade with a set of sync packages replacing a local one"
sp1 = pmpkg("pkg2")
sp1.replaces = ["pkg1"]