[pacman-dev] do we need requiredby?

Nagy Gabor ngaba at bibl.u-szeged.hu
Wed Nov 14 10:47:03 EST 2007


Idézés Aaron Griffin <aaronmgriffin at gmail.com>:

> On Nov 12, 2007 2:18 PM, Travis Willard <travis at archlinux.org> wrote:
> > On Mon, 12 Nov 2007 14:08:07 -0600, Aaron Griffin wrote
> > > On Nov 12, 2007 10:21 AM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
> > > > So I will create a patch for killing requiredby soon. The patched
> pacman will be
> > > > compatible with the old dbs; however, old pacmans with new dbs will
> fail.
> > > > What do you say? Any contras? [my patch would simulate
> alpm_pkg_get_requiredby
> > > > with compute_requiredby]
> > >
> > > Just to make sure I understand you - you want to fully remove
> > > REQUIREDBY from the DB and compute it every time.
> > >
> > > It will be a little slower, BUT, it will help us in a few ways:
> > >
> > > 1) we don't need REQUIREDBY all that often. It's only used in removal,
> > > and replace functionality if I understand correctly. The performance
> > > hit will not be that big in this case (removal happens far less often
> > > than addition).
> > > 2) Our package structures will shrink in size, which is always good
> >
> > 3) Computing requiredby every time will ensure (if the computation is done
> > right) that requiredby will always be correct.  Even after -Rd operations
> > followed by subsequent -S operations and other crazy things.  Basically,
> less
> > bookkeeping to do on install/remove.
> 
> I knew I had more points in my head! This was one of them - preventing
> DB corruption.
> 
> 4) Less disk writes, as we actually have to write, compute, and
> rewrite the entry, if memory serves me correctly.

I found an other worth-to-mention(?) benefit(?) (I refer to db-backend and
PKGINFO vs. DB format discussions here, too):
5.) %REQUIREDBY% was the only altering property in a package's "life". So from
now on, after the package was installed (which is now just a .PKGINFO conversion
(I also prefer killing .PKGINFO <=> desc, files, ... extraction) + filling in
some install-time fields: %REASON%, %INSTALLDATE% ...) its db record _won't_
change until its removal (<- upgrade-remove is also a removal).

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