Discussion:
Something broke in genpkgmetadata.py?
David C. Rankin
2010-11-12 05:27:16 UTC
Permalink
Guys,

I'm using yum-createrepo 0.9.8-3 on Arch Linux and suddenly my createrepo
updates 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
--
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
David C. Rankin
2010-11-12 05:50:44 UTC
Permalink
Post by David C. Rankin
Guys,
I'm using yum-createrepo 0.9.8-3 on Arch Linux and suddenly my createrepo
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
python 3.1.2-2
python2 2.7-3
This bug also effect repoview:

Updating/Creating repoview index and HTML pages...
File "/usr/bin/repoview", line 384
os.mkdir(self.outdir, 0755)
^
SyntaxError: invalid token

Any help or ideas will be appreciated. Thanks.
--
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
seth vidal
2010-11-12 06:01:02 UTC
Permalink
Post by David C. Rankin
Guys,
I'm using yum-createrepo 0.9.8-3 on Arch Linux and suddenly my createrepo
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
if you're using python 3 - then it is possible that print thing is
invalid syntax.

I've not tested or ported createrepo to python3 yet.

-sv
Anders F Björklund
2010-11-12 08:49:55 UTC
Permalink
Post by David C. Rankin
Nothing with createrepo has changed, could this be a python/python2 bug? I have
python 3.1.2-2
python2 2.7-3
Arch Linux has moved their "python" binary, so you need to patch...
(all #!/usr/bin/python needs to be replaced with #!/usr/bin/python2)

We do similar things on Mac OS X and FreeBSD, where /usr/bin/python
is outdated or non-existant. (real one is in /opt/local or /usr/local)

--anders


PS. This broke a *lot* of python programs, not only yum...
See https://wiki.archlinux.org/index.php/Python#Python_2

Almost everyone else has Python 3000 as "python3" instead.
(and "python2" doesn't exist, only python2.6 and friends)
David C. Rankin
2010-11-12 17:33:24 UTC
Permalink
Post by Anders F Björklund
Post by David C. Rankin
Nothing with createrepo has changed, could this be a python/python2 bug? I have
python 3.1.2-2
python2 2.7-3
Arch Linux has moved their "python" binary, so you need to patch...
(all #!/usr/bin/python needs to be replaced with #!/usr/bin/python2)
We do similar things on Mac OS X and FreeBSD, where /usr/bin/python
is outdated or non-existant. (real one is in /opt/local or /usr/local)
--anders
PS. This broke a *lot* of python programs, not only yum...
See https://wiki.archlinux.org/index.php/Python#Python_2
Almost everyone else has Python 3000 as "python3" instead.
(and "python2" doesn't exist, only python2.6 and friends)
Ah!

Thank you Anders & Seth. I knew something broke, but not knowing python from a
snake, all I knew was it changed. I also posted this with Arch so I'll see what
the devs think is the cleanest way to handle this with the distro.

I'll probably have to post a follow-up after I had a chance to thoroughly
confuse myself. Thanks again for your help.
--
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
Loading...