[pacman-dev] [PATCH 0/2] Remove REQUIREDBY usage
dpmcgee at gmail.com
Mon Nov 12 21:01:02 EST 2007
This is mainly an RFC on the whole idea. Nagy, you made me think
enough about it that I just went ahead and whipped something up.
I'd first like to say that I did this in the quickest way possible, so
there is no guarantee I did everything right. I also did nothing to
optimize for efficiency. In some cases, we could be calling the
alpm_pkg_compute_requiredby() function way more than we should,
because I basically replaced any call to alpm_pkg_get_requiredby()
with a corresponding alpm_pkg_compute_requiredby() and free().
Note that we should definitely find a way to pactest or otherwise test
the computed requiredby entries.
Some quick observations:
$ time pacman -Qt > /dev/null (pacman 3, latest GIT release)
$ time ./src/pacman/pacman -Qt > /dev/null (with compute_requiredby switch)
Obviously a slowdown, but is it all that bad in the big scheme of
things when corrupted requiredby entries no longer hurt us?
$ pacman -Qt > orphans-old
$ ./src/pacman/pacman -Qt > orphans-new
$ diff orphans-old orphans-new
> agg 2.5-2
> libnet 126.96.36.199-1
> mysql 5.0.45-1
> python-eyed3 0.6.14-1
> ttf-bitstream-vera 1.10-5
> xmlsec 1.2.10-3
At first, I was worried. Then I see that the new code is much better!
openoffice-base has at least two stale entries in the requiredby
fields of agg and xmlsec, while libnet is stale from being an old
depend of ettercap. So yeah, this new code helps us in a lot of places
(everywhere but speed).
More information about the pacman-dev