[pacman-dev] [PATCH] Resolvedeps rework

Xavier shiningxc at gmail.com
Fri Jul 4 20:04:57 EDT 2008


Nagy Gabor wrote:
>>From 08ea7d37ae38f26d24ba2d3aba5f7272dee2ab73 Mon Sep 17 00:00:00 2001
> From: Nagy Gabor <ngaba at bibl.u-szeged.hu>
> Date: Fri, 4 Jul 2008 20:18:00 +0200
> Subject: [PATCH] Resolvedeps rework
> 
> I divided resolvedeps into 2 functions. The new _alpm_resolvedep function will resolve one dependency,
> for example the 'foo>=1.0-1' dependency.  It can be useful in sync_addtarget refactoring.
> 
> The resolvedeps parameters were changed, to be coherent with recursedeps:
> * the target-list is an alpm_list* instead of alpm_list**. This is OK, because alpm_list_add == alpm_list_add_last
> * syncpkg param was removed. list contains the to-be-installed packages, resolvedeps will add the required dependencies into this list
> * trans param was removed, it was used in QUESTION() only, which can be used on the main (handle->trans) transaction only
>   (because the front-end cannot access our pseudo-transactions at all!)
> 
> The patch fixes some wrong dynamic pmdepmissing_t usage.
> 

I had a quick reading of the new code, and it looked good to me.

> sync1003.py now fails. This is not a bug, but a behavior change, which needs some explanation:
> The old resolvedeps didn't elect packages from 'remove' list. I've dropped this (but can be
> reimplemented trivially by adding a 2nd excluding list param to _alpm_resolvedep), because I don't want
> that 2nd excluding list param. In fact, in real life, we ~never need this rule. Resolvedeps is called
> before checkconflicts, so only -Su's %REPLACES% packages are sitting in 'remove' list. This means, that we have
> the replacement packages in our target list. Usually "foo replaces bar" means, that bar isn't in our repos
> any more, so resolvedeps *cannot* elect it; but usually it won't try it at all, because foo is in the target
> list, and it is expected to satisfy 'bar>=1.0-1'-like dependencies too. In exotic cases this is not true
> (like in sync1003.py), then resolvedeps elect bar (new version). Since checkdeps and checkconflicts is done
> after resolvedeps, this cannot cause any harm. (In sync1003.py pacman simply removes and reinstalls pkg2 now.)
> 

I would suggest just dropping that pactest.




More information about the pacman-dev mailing list