[Yum-devel] Repository management

seth vidal skvidal at phy.duke.edu
Thu May 5 06:45:29 UTC 2005


Again, Sorry for the long delay.

> Ah, so it's possible to do:
> 
> include=http://my-central-server.geewiz.com/yum/repo-generator.cgi

yes. You can thank Ryan and Michael for that. I just fixed a couple of
minor things in that code, they did all the heavy lifting.

> and have it executed each time the URL is hit?  Slick.  Know if anyone
> has done anything interesting with this?  Does yum pass up any
> interesting headers like redhat-release version or some kind of system
> identifier?

it passes up the most interesting header of all - the machine ip
address. :). But no, it doesn't pass up any other headers b/c at the
point that's running it doesn't know anything about its surroundings.



> > That's one of the reasons why I've never looked into implementing it b/c
> > it gets sticky rewriting those files out.
> 
> Assuming the format doesn't change, the tool can simply ignore tags it
> doesn't understand.  Mainly it would need to be able to enable/disable
> them, and maybe fetch a gpg key for a repo.

why would it need to fetch the gpg key? Yum already does that. You can
thank Menno for that code. :)

> Definitely better to design defensively, though, and bail rather than
> mangle a config file.
> 
indeed.



> Yep, it's not particularly complicated code :)  But hey, package
> updates similarly reduce themselves to simply wget'ing.  It's the
> decoration around that core functionality that makes tools like yum
> useful.




> As I see it, the ultimate goal is to have a solid library that any
> tool can use, be it this command like utility, a graphical tool
> perhaps tied to some kind of download action, or even a third party
> yum front-end.  The immediate benefit is simplifying the bootstrap
> process for users to get repos going.  Shortening the time between
> intention and result is a Good Thing(tm).
> 
> I see yum as holding this library and CLI, but that's about it; a
> graphical interface would layer on top of the library, and would
> easily be packaged separately.


So maybe I'm confused. It seems like the library is just a function call
and a progress bar that's really just urlgrabber to an arbitrary
location. It would need to download a .repo file, put it
in /etc/yum.repos.d (or wherever) and, optionally, enable the
repository.

To be clear a function to do that is not a lot of code with the current
infrastructure. So that first step is simple. The second step of
rewriting/parsing the repo files is a slightly different story.

If you're interested in working on it I'll be glad to take a look at the
patches to the yum module.

-sv





More information about the Yum-devel mailing list