This patch helps by cutting down on the repetition seen in the different
chroot cfgs. Right now, root/target_arch/yum.conf goes in my chroot
cfgs and the rest is dumped into general.cfg. The name can change to
whatever, but I think the gist of it is clear. ~/.mockrc is good for
things like custom rpmmacros that you don't want to su for
editing /etc/mock/* stuff all the time.
have fun,
jeff
Index: mock.py
===================================================================
RCS file: /cvs/fedora/mock/mock.py,v
retrieving revision 1.6
diff -u -3 -p -r1.6 mock.py
--- mock.py 28 May 2005 17:18:49 -0000 1.6
+++ mock.py 7 Jun 2005 16:07:15 -0000
@@ -628,6 +628,18 @@ def main():
sys.exit(50)
srpm = args[0] # we only take one and I don't care. :)
+
+ # bring in an optional generic config file
+ general_cfg = os.path.join(config_path, "general.cfg")
+
+ if os.path.exists(general_cfg):
+ execfile(general_cfg)
+
+ # and optional user config file
+ user_cfg = os.path.join(os.path.expanduser("~/.mockrc"))
+
+ if os.path.exists(user_cfg):
+ execfile(user_cfg)
# read in the config file by chroot name
if options.chroot.endswith('.cfg'):
Show replies by thread