On Tuesday 30 August 2005 13:22, Ignacio Vazquez-Abrams wrote:
1) Instead of including config files in the base mock package, put
them in mock-config-<distro>-<distro version> packages so that mock
configs are easy to add via packages. (Corollary: use alternatives
for default.cfg)
Also, some food for thought.
I sent a patch called "flexible config for mock" in June. Since then, I
have found execfile() is an excellent tool to organize configs a bit
better. (Although, the ~/.mockrc is still a good one to allow the user
to override things.)
I have setup some configs for pyvault that you can checkout here:
https://opensvn.csie.org/traccgi/pyvault/trac.cgi/browser/scripts/config/
Some key things that I did:
1. Take all the repetition out and put it in a config called
general.cfg. Using the patch, this is the first to get sourced. You can
get the same effect using execfile inside of the dist-specific configs.
(The string concat operator is your friend!)
2. Created a pseudo target by execfile fedora-4-core-i386.cfg and
renaming things. What it does is uses the same chroot, but changes
some rpm macros necessary for the different environments. In my case,
I can use it to switch library builds between python 2.2, 2.3, and 2.4.
Overkill? maybe. Does it work? yes! :-D
Just some ideas, if you need them...
--
-jeff