From 9b08a5aa9758256389d0fdf3a369447f55ada8e4 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 20 Mar 2007 02:36:21 +0000 Subject: * Fix pacman -Se which installs depends only, as it was broken (Is this useful to anyone?) --- lib/libalpm/sync.c | 16 +++++++++++----- 1 file 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); } } } -- cgit v1.2.3-24-g4f1b