On Mon, Jul 16, 2007 at 07:25:50PM +0200, ngaba@petra.hos.u-szeged.hu wrote:
Yes indeed, it might be safer to remove. OK, my patch attached, please test it. Bye, ngaba
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index a18dc1f..5c94141 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -844,6 +844,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 */
I failed to see why we would require to put the same package more than once in requiredby. I think it works that way, but it isn't necessary, is it? At least I couldn't find a pactest for a case where this would be needed. Is there one? Actually, I've nothing against these multiple requiredby, but I think Dan doesn't like it. I believe it's mostly because of that bug where requiredby were added wrongly multiple times. While in this case, having them multiple times would actually have a meaning (multiple depends), and anyway like you said, it's a corner case that would probably never happen in practice :) So I actually like this patch in its current state a lot (as well as the other one for add_commit). But I think these may still need some review/thoughts.