[Yum-devel] Looking for help with a Yum plugin...
Seth Vidal
skvidal at fedoraproject.org
Fri Jul 17 15:22:28 UTC 2009
On Thu, 16 Jul 2009, Douglas Kilpatrick wrote:
> I'm trying to write a plugin to make it easier to manage packages on a host.
> The basic idea is that each host has a per-host package that has as it's
> requirements things I need the host to support.
>
> ie:
> foo.oppositelock.org-1.0-<epoch seconds>.noarch.rpm
> requires:
> httpd
> sendmail
> bind
>
> This part is done. (per host packages generated automatically by rule, added
> to a repository, etc)
>
> The next part is to allow the per-host package to specify specific versions,
> so that I can rollback a bad upgrade by pushing a new version of the per-host
> package.
>
> foo.oppositelock.org-1.0-<epoch seconds>.noarch.rpm
> requires:
> httpd=httpd-2.2.3-22.el5
> sendmail=sendmail-8.13.8-2.el5
> bind
>
> This, obviously, has some issues; which is why I'm now fiddling with YUM
> plugins.
>
> So I've got a plugin that removes old versions of the per-host package, so
> yum will only see the newest version of that package. As the next trick,
> I'd like to get package downgrades to work correctly. I think skip-broken
> like logic might help, but I'd need to not skip the host-specific package
> (always try and upgrade that. Always).
>
> Any suggestions for approach? Add skip-broken like logic to a post resolve
> hook? Anything else I need to be aware of?
okay so the system has:
foo.domain.org-1.0-1.noarch.rpm installed
which has brought in bar = 1.1-1
you add a:
foo.domain.org-1.0-2.noarch.rpm to the repo which has
Requires bar = 1.0-1
Now, yum will not automatically downgrade pkgs as a depresolving step -
it's generally a bad idea anyway b/c it could very well mean downgrading
into a security whole or walking to backward incompatible versions of
things. No fun.
If you want to write a plugin to do this you'd be best off just calling
downgrade() for each of the pkgs you want to downgrade and then letting
yum depsolve normally from there.
-sv
More information about the Yum-devel
mailing list