On Wednesday 19 December 2001 09:47 pm, Eric S. Raymond wrote:
> Steven Cole <[EMAIL PROTECTED]>:
> > I'm having problems getting the kxref.py script to run using recent
> > versions of cml2.
>
> Hm.  Looks likew Python versions before 2.2b1 get a little confused about
> nested scopes.  I'll put out a 1.9.11 to address this.

Hmmm.  This is interesting.  I got cml2-1.9.11, made a clean 2.4.17-rc2 tree,
installed 1.9.11 and initially got the following errors.  So,  I grabbed
Python 2.2c1 and of course it works just fine.  Then, I re-ran kxref.py using
the older snake (2.1) and it did _not_ blow up as below.  I then deleted the
kxref.out file and Python 2.1 created the wreckage seen below.  I'll stick with 
Python 2.2c1 for now, so this is a non-issue for me, although it may be an issue 
for others who are relying on the RPMS which come with their distro of choice.
Athough getting the latest Python is trivially easy, making it play nicely
with the rest of the system can be more trouble.  If anyone has patches for
making the lpd-related scripts on RH 7.2 work with Python 2.[0,1,2], I'd
certainly appreciate getting them.

When CML2 goes into 2.5.x sometime soon, we probably need to specify the needed 
Python version in Documentation/Changes, along with the URLs of where to obtain it.

Thanks for looking into this,
Steven

Results of cml2-1.9.11 and Python 2.1 after kxref.out is deleted:
[root@spc linux-2.4.17-rc2-cml2]# scripts/kxref.py -e
scripts/kxref.py:145: SyntaxWarning: local name 'definere' in 'makexref' shadows use 
of 'definere' as global in nested scope 'xrefvisit'
  def makexref(tree):
Regenerating cross-reference database...Traceback (most recent call last):
  File "scripts/kxref.py", line 540, in ?
    load_context(sourcetree)
  File "scripts/kxref.py", line 492, in load_context
    (xrefs, cml1types) = makexref(tree)
  File "scripts/kxref.py", line 221, in makexref
    os.path.walk(".", xrefvisit, xrefdict)
  File "/usr/lib/python2.1/posixpath.py", line 277, in walk
    walk(name, func, arg)
  File "/usr/lib/python2.1/posixpath.py", line 269, in walk
    func(arg, top, names)
  File "scripts/kxref.py", line 216, in xrefvisit
    filevisitor(dict, node)
  File "scripts/kxref.py", line 191, in filevisitor
    symdef = definere.search(lines[0])
NameError: global name 'definere' is not defined

_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to