[arch-general] Could python2 be breaking genpkgmetadata.py?

David C. Rankin drankinatty at suddenlinkmail.com
Fri Nov 12 06:32:35 CET 2010


Guys,

	I'm using yum-createrepo 0.9.8-3 on from AUR and suddenly my createrepo updates
on my Arch server are failing with the following error:

23:22 nirvana:/home/backup/rpms> sudo createrepo --update -d openSUSE_11.3/
  File "/usr/share/createrepo/genpkgmetadata.py", line 189
    print thing
              ^
SyntaxError: invalid syntax

	Nothing with createrepo has changed, could this be a python/python2 bug? I have
both the following installed:

python 3.1.2-2
python2 2.7-3

	Should I have both installed? I've also posted to the rpm-metadata list to see
if they have identified an issue with the genpkgmetadata.py script. The relevant
lines in the python script are:

class MDCallBack(object):
    """cli callback object for createrepo"""
    def errorlog(self, thing):
        """error log output"""
        print >> sys.stderr, thing

    def log(self, thing):
        """log output"""
        print thing

    def progress(self, item, current, total):
        """progress bar"""
        beg = "%*d/%d - " % (len(str(total)), current, total)
        left = 80 - len(beg)
        sys.stdout.write("\r%s%-*.*s" % (beg, left, left, item))
        sys.stdout.flush()

    Which since I don't know python -- it might as well be Greek. But from the
error, I can tell it chokes on the line "print thing"... whatever that thing is.

    Anybody have any info on any problems caused by recent python changes?

-- 
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com


More information about the arch-general mailing list