[pacman-dev] [PATCH] Kill compute_requiredby usage in deps.c/can_remove_package()

Xavier shiningxc at gmail.com
Mon Apr 21 05:43:55 EDT 2008


On Mon, Apr 21, 2008 at 10:45 AM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
>
>  Correct. But in deps.c almost all functions have these pointers.
>
>  Oops, ,,quote'' is the Hungarian "quote", sorry (in TeX style). External
>  refers to external member of requiredby list, which means package not
>  in 'targets' list. So we needn't calculate the whole requiredby list
>  (sometimes), we can stop if we find a package with that property.
>
>  What shall I change? The commit message?
>

I am not sure what Dan wanted, but my suggestion would be to keep the
patch as is, and change the commit message to something like this :

"In the can_remove_package function, we don't need to compute the
whole requiredby list, we just need to find one member of it that
doesn't belong to the targets list.
That way we get a small speedup and remove the only usage of
alpm_pkg_compute_requiredby in the backend, so that it can be tweaked
for frontend usage."

Then someone could do a separate patch that removes all the useless db
param from deps.c for example, if that is a good idea.




More information about the pacman-dev mailing list