[Spacewalk-list] Spacewalk kickstart generating & snippet compiling
Martin Zehetmayer
martin at zehetmayer.at
Fri May 20 14:36:03 UTC 2011
Hi,
I have solved the issue - the problem was in the package of the cheetah templating engine I used.
My spacewalk server runs on RHEL6.1 with the following cheetah version:
python-cheetah.x86_64 2.4.1-1.el6
I crosschecked the files on my cobbler installation which was initially on rhel 6.1 beta. The only
difference I found was in the Template.py file:
--- snip ---
ve /usr/lib64/python2.6/site-packages/Cheetah/Template.py
--- /usr/lib64/python2.6/site-packages/Cheetah/Template.py.save 2011-05-20 18:04:15.107222270 +0200
+++ /usr/lib64/python2.6/site-packages/Cheetah/Template.py 2011-05-20 18:04:23.274678303 +0200
@@ -1549,6 +1549,18 @@
mainMethodName=mainMethodName,
compilerSettings=compilerSettings,
keepRefToGeneratedCode=True)
+
+ if not self.__class__ == Template:
+ # Only propogate attributes if we're in a subclass of
+ # Template
+ for k, v in self.__class__.__dict__.iteritems():
+ if not v or k.startswith('__'):
+ continue
+ ## Propogate the class attributes to the instance
+ ## since we're about to obliterate self.__class__
+ ## (see: cheetah.Tests.Tepmlate.SubclassSearchListTest)
+ setattr(self, k, v)
+
self.__class__ = templateClass
# must initialize it so instance attributes are accessible
templateClass.__init__(self,
--- snip ---
After patching the Template.py on my spacewalk installation the parsing of kickstart files with the SNIPPET()
define worked.
Question is: what changed the Template.py? I suppose it was a part of rhel 6.1b which doesn't make it in rhel 6.1
but I need to check that. Anyone else has an idea?
regards,
Martin
More information about the Spacewalk-list
mailing list