[pacman-dev] do we need requiredby? + bash_completion
Nagy Gabor
ngaba at bibl.u-szeged.hu
Mon Nov 12 09:41:57 EST 2007
> commit 96f8faa6664714943201d86393099dbf7464abc2
> Author: Chantry Xavier <shiningxc at gmail.com>
> Date: Sun Nov 11 10:52:51 2007 -0600
>
> Add two requiredby pactests
>
> One currently should succeed (006), and 005 fails.
>
> requiredby005.py is originally from Nagy Gabor
> <ngaba at petra.hos.u-szeged.hu>.
Well, I'm not sure that pacman should deal with broken localdbs. After we
decided that _all_ satisfiers _must_ list the dependency "owner" in their
requiredby, this is a broken db. We have a cool testdb stuff (created by you) to
help user fix these (an automatized db fix wouldn't be so hard to implement).
Well, nowadays I started to dislike requiredby:
1. The requiredby handling was _very_ negligent earlier, so most users have
corrupt localdbs.
2. When the old deps.c just trusted on these fields blindly (-R), these db
corruptions caused wrong pacman operation too. After we implemented a slower but
more clever checkdeps, all of these problems disappeared.
3. So now a missing requiredby can generate a bug, a false cannot. Note: we use
requiredby as a speed-up only (probably speed-up was the main reason for
implementing it).
4. Do we really need this speed-up?
a.) This is not as efficient as it could be:
%REQUIREDBY% should show the dependency also [%REQUIREDBY% gcc:bash>=3.2]; since
now foo's %REQUIREDBY% says gcc only, so we have to _scan_ pkgcache for gcc;
then check _all_ dependencies of gcc to find the foo-satisfies-this ones.
b.) If we didn't use requiredby at all, we should just scan pkgcache (only
once!, now we scans it n times, if foo has n requiredby fields), and simply
check all depends of all packages to find the satisfied-by-foo dependencies.
This would probably slower, and evaluate its degree, but testdb is extremely
fast, which makes me optimist.
>
> commit 84433c880055faeaa7cf48a4f0a4fe9a7cf5ca1d
> Author: Dan McGee <dan at archlinux.org>
> Date: Fri Nov 9 00:23:25 2007 -0600
>
> Update bash completion
>
> Signed-off-by: Dan McGee <dan at archlinux.org>
>
First of all: Dan, many thanks, great job.
Hoverer (don't kill me plz;-), now the new --ignoregroup is missing (maybe
others too).
We should reach (verify) that bash_completion is up-to-date; and then all new
pacman option should trigger a bash_completion update and manual update too to
keep that state.
I'm sorry for "assigning" new tasks to you (I am a living TODO sometimes here,
sry), but I'm not sure that I could hack that correctly [I could "copy" the
rules, but I wouldn't take the responsibility for that]:-(
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