[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Yum, autoupdate



On Tue, 2003-07-29 at 20:39, James Olin Oden wrote:
>  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.
> 

Wouldn't it be more straightforward to make 'dummy' RPMs that use the
provides/requires capabilities to provide this sort of validation, and
then use appropriate %pre and %post scripts in the RPMs?  For example,
you could have a "platform-release" RPM that requires all the packages
that you're trying to install.  This would have a %post script that
would execute the necessary checkins you refer to.  Because of the
automatic ordering that RPM installations perform, the
"platform-release" %post should run after all the require'd RPMs get
installed, unless I'm misunderstanding something.

Maybe that won't work in your situation, but it seems to me that since
RPM already has all of this complexity and extensibility, you should use
it there, instead of adding duplicate code to yum.

--Jeremy

-- 
/---------------------------------------------------------------------\
| Jeremy Portzer       jeremyp pobox com       trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\---------------------------------------------------------------------/

Attachment: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]