[pacman-dev] [GIT] The official pacman repository branch, master, updated. v3.0.0-626-g72f40b3

Nagy Gabor ngaba at bibl.u-szeged.hu
Mon Nov 26 05:35:51 EST 2007


> commit 7d37d9278d0ab6eb46ec4689c8091780382cbb95
> Author: Nagy Gabor <ngaba at petra.hos.u-szeged.hu>
> Date:   Sun Aug 12 22:26:54 2007 +0200
> 
>     Fix for sync1003 and sync1004 pactests
>     
>     checkdeps and resolvedeps now take both a remove list and an install list
> as
>     arguments, allowing dependencies to be calculated correctly.
>     
>     This broke the sync990 pactest, but this pactest used dependencies and
>     provides in an unusual way, so it has been changed.
>     
>     Dan: the sync990 pactest was just plain wrong. It didn't satisfy the
>     dependencies correctly, so should never have succeeded.
>     
>     Signed-off-by: Chantry Xavier <shiningxc at gmail.com>
>     [Dan: some variable renaming, clarification in commit message]
>     Signed-off-by: Dan McGee <dan at archlinux.org>
> 

Wow, thanks. Special thanks to Xavier, who keep this patch in sync with the
current tree.

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]
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).

Bye, ngaba


----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/





More information about the pacman-dev mailing list