[pacman-dev] CVS update of pacman-lib/lib/libalpm (remove.c sync.c)
Dan McGee
dan at archlinux.org
Sat Mar 3 20:22:57 EST 2007
Date: Saturday, March 3, 2007 @ 20:22:57
Author: dan
Path: /home/cvs-pacman/pacman-lib/lib/libalpm
Modified: remove.c (1.72 -> 1.73) sync.c (1.107 -> 1.108)
* Maybe that call to _alpm_trans_update_depends was necessary. Added it back
in but did it right by duplicating the package first.
----------+
remove.c | 10 +++++++++-
sync.c | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
Index: pacman-lib/lib/libalpm/remove.c
diff -u pacman-lib/lib/libalpm/remove.c:1.72 pacman-lib/lib/libalpm/remove.c:1.73
--- pacman-lib/lib/libalpm/remove.c:1.72 Sat Mar 3 15:22:48 2007
+++ pacman-lib/lib/libalpm/remove.c Sat Mar 3 20:22:57 2007
@@ -264,7 +264,7 @@
int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
{
- pmpkg_t *info;
+ pmpkg_t *info, *infodup;
alpm_list_t *targ, *lp;
ALPM_LOG_FUNC;
@@ -330,6 +330,9 @@
}
}
+ /* duplicate the package so we can remove the requiredby fields later */
+ infodup = _alpm_pkg_dup(info);
+
/* remove the package from the database */
_alpm_log(PM_LOG_DEBUG, _("updating database"));
_alpm_log(PM_LOG_DEBUG, _("removing database entry '%s'"), pkgname);
@@ -343,6 +346,11 @@
pkgname);
}
+ /* update dependency packages' REQUIREDBY fields */
+ _alpm_trans_update_depends(trans, infodup);
+ _alpm_pkg_free(infodup);
+
+
PROGRESS(trans, PM_TRANS_PROGRESS_REMOVE_START, pkgname, 100,
alpm_list_count(trans->packages),
(alpm_list_count(trans->packages) - alpm_list_count(targ) +1));
Index: pacman-lib/lib/libalpm/sync.c
diff -u pacman-lib/lib/libalpm/sync.c:1.107 pacman-lib/lib/libalpm/sync.c:1.108
--- pacman-lib/lib/libalpm/sync.c:1.107 Sat Mar 3 03:14:00 2007
+++ pacman-lib/lib/libalpm/sync.c Sat Mar 3 20:22:57 2007
@@ -1065,7 +1065,7 @@
}
}
- _alpm_log(PM_LOG_DEBUG, _("package '%s not found in sync"), pkgname);
+ _alpm_log(PM_LOG_DEBUG, _("package '%s' not found in sync"), pkgname);
return(NULL); /* not found */
}
More information about the pacman-dev
mailing list