[pacman-dev] [patch] removedeps

Xavier shiningxc at gmail.com
Fri Jul 13 16:29:47 EDT 2007


On Fri, Jul 13, 2007 at 10:11:02PM +0200, ngaba at petra.hos.u-szeged.hu wrote:
> Hi!
> I think *targs can be used instead of **targs in recursedeps; the 
> assumption is needed for speed efficiency only and keeping topo sort. 

This is a line from your original patch there :
http://www.archlinux.org/pipermail/pacman-dev/2007-June/008539.html
+ * assumptions: alpm_list_add adds new member to the end of the list, so we
can reuse the list pointer

IMO it isn't necessarily the end, as long as it adds after the first element.
I think this assumption is needed now with the way you changed the function (adding the
new elements to the list passed in argument, instead of returning a new
list).
But when using **targs, we don't need that.

For keeping toposort however, we do need a function that explicitly add to
the end of the list, which we don't have now.

> (So be careful when patching remove.c, this assumption is used!). 

What do you mean there ?
If we remove the while(!ready) loop, we will indeed need to sort the list before.
I applied this part of your patch anyway, even if it isn't used now, it might
be used later, if we remove that while loop.

> Anyway, the topo-sorted invariancy should be mentioned in the 
> description of recursedeps, IMHO.

This isn't needed currently, but I marked it as a TODO.
That's why I removed it from the description.
It should obviously be added back when we have a alpm_list_add_last or
something, which would allow us to kill this TODO :)

> I like your include_explicit variable :-P

hm, really? :d




More information about the pacman-dev mailing list