From b1808930ce45a034981626fc20bbc7920890899e Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Mon, 16 Jul 2007 20:58:58 +0200 Subject: libalpm/add.c,trans.c : cleanup of requiredby handling. This patch cleans up and fix the _alpm_trans_update_depends function and ensure that all requiredby fields are filled in case of multiple satisfiers (previously, the handling of mutliple satisfiers in that function was inconsistent). This makes a special case handling of requiredby in commit_single_pkg() obsolete, and so allows cleaning that code as well. Also fixed upgrade056 pactest because : 1) the requiredby fields were wrong, and this wouldn't happen with the fixed _alpm_trans_update_depends(). 2) this is a very unusual case anyway (and handling all corner cases combined to a broken database seems nearly impossible to achieve). References : http://www.archlinux.org/pipermail/pacman-dev/2007-July/008919.html http://www.archlinux.org/pipermail/pacman-dev/2007-July/008920.html Signed-off-by: Chantry Xavier --- lib/libalpm/package.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libalpm/package.c') diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index e11d7476..135a3510 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -1109,6 +1109,9 @@ int _alpm_pkg_splitname(const char *target, char *name, char *version, int witha /* scan the local db to fill in requiredby field of package, * used when we want to install or add a package */ + +/* A depends on B through n depends <=> A listed in B's requiredby n times + * n == 0 or 1 in almost all cases */ void _alpm_pkg_update_requiredby(pmpkg_t *pkg) { const alpm_list_t *i, *j; -- cgit v1.2.3-70-g09d2