Switch to a sane packaging and upgrade system

Bernardo Innocenti bernie at laptop.org
Thu Jan 17 22:42:54 EST 2008


C. Scott Ananian wrote:

> My thoughts are that I would like to write a yum post-install hook
> which stashed a copy of the RPMs installed to /home/olpc/.rpmcache.  A
> post-upgrade hook (in olpc-configure) would attempt to reinstall all
> rpms found in /home/olpc/.rpmcache.  This would address this common
> use-case (as well as my own: I keep having to re-install emacs).

Yum already downloads all the rpms in /var/lib/yum/<dist>/packages.
I don't think we need to do anything special.


> Volunteers to write the yum hook welcome; the post-upgrade hook is simple.

I don't think it's necessary.  If a yum update
gets interrupted, there are two possibilities:

1) the system does not boot any more

2) the system boots normally


In (1), you need to reflash or boot from an older
snapshot.

In case (2), you could resume yum normally and it will
not even need to download any packages.  But you could
as well do (1).

So my proposal is: let's extract the checkpointing
code from olpc-update and use it as a wrapper for
invoking yum.  "safe-yum"?  It should be much easier
and safer.

The downsides of using yum remains that it's a real memory
hog and it will take additional disk space for all the rpms.
Developers can learn to get around these limitations, but
automated upgrades would fail very frequently due to these
problems.

A very effective solution is reducing the number of packages
that yum has to deal with.  Fedora is around 11 *thousand*
packages.  OLPC ships with 450.  Clearly, we could save a
lot of time and memory by disabling the huge Fedora repository.

Dennis, what do you think?

-- 
 \___/
 |___|   Bernardo Innocenti - http://www.codewiz.org/
  \___\  One Laptop Per Child - http://www.laptop.org/



More information about the Devel mailing list