[pacman-dev] [PATCH] alpm_checkdeps clean-up <- some notes
shiningxc at gmail.com
Sat Dec 1 17:04:53 EST 2007
On Sat, Dec 01, 2007 at 10:52:23PM +0100, Nagy Gabor wrote:
> > > 3.
> > > alpm_list_diff is quite fast (n+m), but it needs to order lists
> > > first O(nlogn)+O(mlogm); however dbcache is initially(?) ordered.
> > > Note: We had some alpm_list problems nowadays, after this patch
> > > alpm_list_diff function becomes crucial...
> > This would depend on the order in which readdir reads the file on the
> > filesystem, right? So on the order on the filesystem?
> > I am not sure if there is any garanty it will always be in the order
> > we want (on any filesystem, any os), but I may be totally off, so
> > hopefully someone else knows better :)
> cache.c, lines: 71, 134.
Oh ok, I missed this explicit msort call, I didn't know about that :)
So why not having an alpm_list_diff_sorted function, and making
alpm_list_diff sort the two lists, then call alpm_list_diff_sorted ?
More information about the pacman-dev