On Mon, Nov 26, 2007 at 11:35:51AM +0100, Nagy Gabor wrote:
I noticed a little memleak in the patch: ---------- +char *missdepstring = alpm_dep_get_string(depend); -... +if(!alpm_depcmp(oldpkg, depend)) { + continue; +} ----------
Well, I will create a cosmetics patch for this, soon [I am also quite busy now, be patient ;-)]: 1. get rid of the ugly joined list [maybe with two for-loops] <- I used this to avoid duplicated code, and indeed... the result is _really_ ugly 2. remove compute_requiredby, and check the whole "untouched" localdb by hand [this is more suggestive imho, and a _little bit_ faster]
sounds good.
3. I need your feedback here: Well, the "universal" alpm_list_find is reimplemented in many places, for example we could use this as a search-for-satisfier with the help of alpm_depcmp, the only problem is, that alpm_depcmp's match is 1, not 0 <- So shall I implement a trivial not_alpm_depcmp function as a helper function (my opinion: no) or give a new "compare-function-indicates-match-with" parameter to alpm_list_find (my opinion: yes).
Oh crap, that's confusing. I don't even know which way I prefer, both sound ugly. But I have a small preference for the helper (helper functions are generally needed for using alpm_list_find anyway), rather than a confusing and additional parameter.