[pacman-dev] [PATCH] deps.c: check for indirect deps when ordering

Florian Pritz bluewind at xinu.at
Thu Oct 17 07:57:22 EDT 2013


On 18.06.2013 08:04, Allan McRae wrote:
> On 19/05/13 05:53, Andrew Gregory wrote:
>> On upgrades, indirect dependencies were not being detected if there was
>> a dependency in between them that was not part of the transaction.  For
>> example, with the dependency chain: pkg1 -> pkg2 -> pkg3, if pkg1 and
>> pkg3 are being upgraded but not pkg2 pacman would not order pkg1 and
>> pkg3 properly.
>> 
>> This was particularly problematic when replacements were involved
>> because the replaced package(s) would be removed at the start of the
>> transaction.  If an install script required the replacer and lacked
>> a direct dependency, it could fail.
>> 
>> Fixes FS#32764.
>> 
>> Partially fixes FS#23011.
>> 
>> Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
>> ---
>> 
>> The need to keep state in order to avoid getting stuck in cyclic dependencies
>> makes this a little ugly (hence the wrapper function).  If anybody has a better
>> idea for avoiding those loops, I'd love to clean it up.
> 
> Finally got to reviewing this...   I can not immediately see a way to
> avoid those loops.
> 
> Signed-off-by: Allan

This patch causes a slowdown from subsecond sort time to ~60sec on my
machine (i7-920) when sorting 183 packages for -Su.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/pacman-dev/attachments/20131017/9c9ed63d/attachment.asc>


More information about the pacman-dev mailing list