summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-03-20 02:36:21 +0000
committerAaron Griffin <aaron@archlinux.org>2007-03-20 02:36:21 +0000
commit9b08a5aa9758256389d0fdf3a369447f55ada8e4 (patch)
treef22df6dd90b4dabab50fc4239cd599cc025879e0 /lib/libalpm/sync.c
parent0fa7d47a4da849c1346a63a8d4327c253ef0a0e6 (diff)
downloadpacman-9b08a5aa9758256389d0fdf3a369447f55ada8e4.tar.xz
* Fix pacman -Se which installs depends only, as it was broken
(Is this useful to anyone?)
Diffstat (limited to 'lib/libalpm/sync.c')
-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);
}
}
}