Wednesday, November 10, 2010

[bug]chocolate-doom package build

A bug in the build for the chocolate-doom AUR package was brought to my attention recently:
  1. ./docgen -m manpage.template ../src > chocolate-doom.6
  2.   File "./docgen", line 392
  3.     print line.rstrip()
  4.              ^
  5. SyntaxError: invalid syntax
  6. make[2]: *** [chocolate-doom.6] Error 1
  7. make[2]: Leaving directory `/home/arin/Downloads/chocolate-doom/src/chocolate-doom-1.4.0/man'
  8. make[1]: *** [all-recursive] Error 1
  9. make[1]: Leaving directory `/home/arin/Downloads/chocolate-doom/src/chocolate-doom-1.4.0'
  10. make: *** [all] Error 2

Archlinux recently swiched from Python2 to Python3 as the default python. It uses symlinks to point /usr/bin/python to the actual Pythonx package. While Python2 is still installed, the /usr/bin/python symlink now points to Python3. The docgen script was using the default python (now Python3). The opening line for the script read: '#! /usr/bin/env python'. So, I will look into this, but the syntax used, which threw the error, was probably deprecated (or there's a bug). The salution thus being to edit the file to use Python2. Thus, the line "sed 's/python/python2/' -i man/docgen" was added to the PKGBUILD. The Python2 package also had to be added to the list of dependencies.

No comments:

Post a Comment