[pacman-dev] CVS update of pacman-lib/lib/libalpm (sync.c)

Aaron Griffin aaron at archlinux.org
Mon Mar 19 22:36:21 EDT 2007


    Date: Monday, March 19, 2007 @ 22:36:21
  Author: aaron
    Path: /home/cvs-pacman/pacman-lib/lib/libalpm

Modified: sync.c (1.110 -> 1.111)

* Fix pacman -Se which installs depends only, as it was broken
  (Is this useful to anyone?)


--------+
 sync.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)


Index: pacman-lib/lib/libalpm/sync.c
diff -u pacman-lib/lib/libalpm/sync.c:1.110 pacman-lib/lib/libalpm/sync.c:1.111
--- pacman-lib/lib/libalpm/sync.c:1.110	Mon Mar  5 17:13:34 2007
+++ pacman-lib/lib/libalpm/sync.c	Mon Mar 19 22:36:21 2007
@@ -416,11 +416,17 @@
 			} 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);
 				}
 			}
 		}




More information about the pacman-dev mailing list