Re: speeding repository rebuild (compared to yum)

Marc MERLIN <[email protected]> Sun, 12 Sep 2004 02:09:01 -0700
Newsgroups gmane.linux.conectiva.apt-rpm
Message-ID <[email protected]>
On Tue, Sep 07, 2004 at 08:06:58PM +0300, Ville Skyttä wrote:
> On Tue, 2004-09-07 at 19:51, Marc MERLIN wrote:
> 
> > So, is there any way I can make rebuilds faster
> 
> One thing to try out would be to grant the user rebuilding the indexes
> write access to the /var/cache/apt/gen*list dirs, that enables md5
> caching and should speed things up quite a bit.

Indeed. It went down from 30mn to about 20secs.
Quite a shame that the apt rpm doesn't create those

On Tue, Sep 07, 2004 at 08:18:14PM +0300, Panu Matilainen wrote:
> > My understanding is that the index rebuild opens up all the RPMs, and
> > computes all the dependencies then, which is why it takes that long.
> 
> No, genbasedir doesn't calculate any dependencies, it merely dumps them
> to the metadata files much like yum does.
 
I had assumed it was as an attempt to explain why it was so slow.
Turns out it had nothing to do with it.

> What genbasedir does is very close to what yum-arch does with two
> significant differences performance-wise:
> - apt's metadata is compressed with bzip2 which is quite heavy
> computionally (compared to yum using gzip)

Right. Not too relevant in my case. CPU is ok.

> - gen*list utilities calculate md5sum's for each package processed,
> which takes a lot of time unless the results are cached

That was my problem indeed

> See
> > In other words, I need installs and upgrades with the absolute guarantee
> > that no extra package will be installed, or nothing will be removed as a
> > result. As far as I can tell, yum does not provide that functionality.
> 
> Yum does have similar operations as upgrade vs dist-upgrade (update vs
> upgrade in yum) but not the concept of --trivial-only IIRC.

Not quite actually:

       update If  run without any packages, update will update every currently
              installed package.  If one or more packages are  specified,  Yum
              will  only update the listed packages.  While updating packages,
              yum will ensure that all  dependencies  are  satisfied.   If  no
              package  matches  the given package name(s), they are assumed to
              be a shell glob and any matches are then installed.

So, I can't use this one since it will resolve dependencies for me.

       upgrade
              Can take packages as arguments,  upgrade  is  just  like  update
              except  that it includes package obsoletes in its calculations -
              this makes it better for distro-version  changes,  for  example:
              upgrading from somelinux 8.0 to somelinux 9. *deprecated* - this
              command may be removed in the future.

That one is deprecated, and is even worse: not only will it add dependencies
I can't verify and vet, but it will remove anything on my system that some
RPM's Obsolete's line specifies.
This behaviour is absolutely unsafe for me.

So, yes, yum doesn't provide anything equivalent to either
- apt-get upgrade (update looks more like a dist-upgrade equivalent since it
  follows deps)
- apt-get install --trivial-only foo

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger [email protected] for PGP key