summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/sync.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index f3a0ee06..edc82a1b 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -416,11 +416,17 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
} else {
/* remove the original targets from the list if requested */
if((trans->flags & PM_TRANS_FLAG_DEPENDSONLY)) {
- void *vp;
- pmpkg_t *p;
- trans->packages = alpm_list_remove(trans->packages, spkg, _alpm_pkg_cmp, &vp);
- p = vp;
- FREEPKG(p);
+ void *vpkg;
+ pmsyncpkg_t *sync;
+ const char *pkgname;
+
+ pkgname = alpm_pkg_get_name(spkg);
+ _alpm_log(PM_LOG_DEBUG, "removing package %s-%s from the transaction targets",
+ pkgname, alpm_pkg_get_version(spkg));
+
+ sync = _alpm_sync_find(trans->packages, pkgname);
+ trans->packages = alpm_list_remove(trans->packages, sync, syncpkg_cmp, &vpkg);
+ FREESYNC(vpkg);
}
}
}