Yum, autoupdate (was: Re: Graphical boot isn't so graphical)

James Olin Oden joden at malachi.lee.k12.nc.us
Wed Jul 30 00:39:23 UTC 2003


On 29 Jul 2003, seth vidal wrote:

> 
> > -  Furthermore I probably want to be able to run scripts before
> >    or after rpm actions being done (like the LUA scripts in
> >    apt-rpm).  I know this is Python and it should be probably
> >    pretty easy to add...
> 
> All things are easy - and all things take time and planning to keep from
> screwing them up badly.
> 
> I'm not sure where I'd want the arbitrary run stuff to occur - I've
> mostly estimated it being done AFTER the fact - not before.
>
Hi Seth,

I haven't been paying close attention to this conversation, but this 
peaked my interest.  I have been thinking of replacing our internal
upgrade scripts with your yum.  One of the things that I would require
to do that is basically what he is asking for.  That is that there be
hooks before and after the installation of the rpms.  There may need
to be more than just one of each, also, I have not thought completely
through this yet.  But, as an example, on our platforms we have a file
that contains the current platform version (similar to redhat-release
but different...).  We don't do an upgrade if the platform version on the
system is greater than the platform version we are installing.  In order
to do something like that with yum, we would need a hook to do some
sort of prevalidation.  

We would need another hook before and afterword to run arbitrary scripts
(but not for validation purposes).  Right now we deliver a lot of rpms
that make various changes to config files.  In these rpms we check the
files out via rcs (well a wrapper I wrote), make the changes, and then
check them back in.  Course not everything on the system is using rcs
when it changes config files.  To fix this we run a script that finds
every config file that has an element in its repository and see if what
is in the filesystem differs from the most current version in the 
repository.  If it does then we check those changes in as the latest 
version.  We need to do the same thing afterward, because, obviously
we can't expect RedHat to make their rpms use our wrapper (-;.

So just there, without thinking too hard (it hurts (-;), you have
three hooks needed:

	- one for validation before hand.
	- one to run general purpose scripts before the rpm transaction.
	- one to run general purpose scripts after the rpm transaction.

You probably could throw a post validation hook in there also (especially 
when yum starts supporting transactional rollbacks (-;).

Anyway, I am just throwing this out there as food for thought.  When, and
if I decide to make the change, I will talk with you more, and probably 
be sending you patches shortly thereafter.  Actually, my biggest
hangup with yum (and this is foolishness) is that its written in python,
and write in perl and would love an excuse to to take RPM2 to the next
level...but I have to be prudent.

Cheers...james 

P.S.  The other thing I would need yum to do (and it may already do this)
is to make its selection of rpms from a CDROM if so configured.





More information about the fedora-test-list mailing list