Bug 852234 - pcp 3.6.6-1 pcp.py fails to compile with python2.4 in epel5
Summary: pcp 3.6.6-1 pcp.py fails to compile with python2.4 in epel5
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: pcp
Version: el5
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: ---
Assignee: Mark Goodwin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-27 23:53 UTC by Mark Goodwin
Modified: 2012-10-25 22:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-19 01:37:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch for pcp.py to compile on epel5 with python2.4 (1.08 KB, patch)
2012-08-28 07:04 UTC, Mark Goodwin
no flags Details | Diff
patch for pmcollectl.py to compile on epel5 (6.44 KB, patch)
2012-08-28 07:12 UTC, Mark Goodwin
no flags Details | Diff

Description Mark Goodwin 2012-08-27 23:53:00 UTC
building pcp-3.6.6-1 against el5-candidate fails with python4.7 syntax errors.
These errors do not occur with more recent targets (e.g. python2.7 in 
f17-candidate).

=== python ===
python setup.py install --skip-build --root=${DIST_ROOT-/} --record=../../python-pcp.list
running install
running install_lib
creating /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4
creating /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages
copying build/lib.linux-x86_64-2.4/pmapi.so -> /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages
copying build/lib.linux-x86_64-2.4/pcp.py -> /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages
copying build/lib.linux-x86_64-2.4/pcpi.py -> /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages
byte-compiling /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages/pcp.py to pcp.pyc
  File "/usr/lib64/python2.4/site-packages/pcp.py", line 137
    except KeyError as e:
                     ^
SyntaxError: invalid syntax
byte-compiling /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages/pcpi.py to pcpi.pyc
writing list of installed files to '../../python-pcp.list'
/usr/bin/gawk --posix '{print} /.pyc$/ {sub(/.pyc$/,".pyo"); print}' < ../../python-pcp.list > ../../python-pcp.list.rpm

After fixing that by 's/as e:/:/', the next build error was :

=== python ===
python setup.py install --skip-build --root=${DIST_ROOT-/} --record=../../python-pcp.list
running install
running install_lib
creating /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4
creating /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages
copying build/lib.linux-x86_64-2.4/pmapi.so -> /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages
copying build/lib.linux-x86_64-2.4/pcpi.py -> /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages
copying build/lib.linux-x86_64-2.4/pcp.py -> /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages
byte-compiling /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages/pcpi.py to pcpi.pyc
byte-compiling /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages/pcp.py to pcp.pyc
  File "/usr/lib64/python2.4/site-packages/pcp.py", line 289
    return "pmValueSet@%#lx id=%#lx numval=%d valfmt=%d" % (addressof(self), self.pmid, self.numval, self.valfmt) + (str([" %s" % str(self.vlist[i]) for i in xrange(self.numval)])) if self.valfmt == 0 else ""
                                                                                                                                                                                      ^
SyntaxError: invalid syntax
writing list of installed files to '../../python-pcp.list'
/usr/bin/gawk --posix '{print} /.pyc$/ {sub(/.pyc$/,".pyo"); print}' < ../../python-pcp.list > ../../python-pcp.list.rpm

at which point I gave up. Note also that despite the build failure
the build continued rather than failing, resulting in rpm packaging errors
later on :

Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/pcp-3.6.6-1.el5-root-mockbuild
RPM build errors:
    ...
    File not found: /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages/pcp.pyc
    File not found: /var/tmp/pcp-3.6.6-1.el5-root-mockbuild/usr/lib64/python2.4/site-packages/pcp.pyo
Child return code was: 1
EXCEPTION: Command failed. See logs for output.

Comment 1 Mark Goodwin 2012-08-27 23:55:06 UTC
Full build log (after fixing the first error) is at :
http://kojipkgs.fedoraproject.org//work/tasks/7886/4427886/build.log

Comment 2 Mark Goodwin 2012-08-27 23:56:38 UTC
sorry: in the above report I mean python2.4 (fails) and python2.7 (works).

Comment 3 Mark Goodwin 2012-08-28 07:04:49 UTC
Created attachment 607421 [details]
patch for pcp.py to compile on epel5 with python2.4

patch to get the epel5 build working, but then pmcollectl needs some work too ...

Comment 4 Mark Goodwin 2012-08-28 07:12:50 UTC
Created attachment 607424 [details]
patch for pmcollectl.py to compile on epel5

patched pmcollectl will compile on epel5, but then it has missing modules
when you try and run it on RHEL5 :

# /tmp/pmcollectl.py 
Traceback (most recent call last):
  File "/tmp/pmcollectl.py", line 35, in ?
    import argparse
ImportError: No module named argparse

So I think this is an uphill battle. We should just make a spec change to
not support python-pcp on RHEL5 (and don't build it or package it for 
el5-candidate).

Longer term, python2.7 for RHEL5 does unofficially exist,
e.g. see http://ftp.srce.hr/redhat/test/el5/x86_64/
So we could push that into epel5 at some point.

Comment 5 Mark Goodwin 2012-08-28 23:56:50 UTC
For the record, the patch in Comment #3 (pcp.py) made it into pcp-3.6.6-1
since it was causing an el5 build failure. We didn't take the pmcollectl
patch at this stage.

Comment 6 Nathan Scott 2012-10-19 01:37:14 UTC
This issue has been resolved in the now released pcp-3.6.9.

Comment 7 Fedora Update System 2012-10-25 22:18:09 UTC
pcp-3.6.9-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/pcp-3.6.9-1.el5

Comment 8 Fedora Update System 2012-10-25 22:18:41 UTC
pcp-3.6.9-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/pcp-3.6.9-1.fc18

Comment 9 Fedora Update System 2012-10-25 22:19:09 UTC
pcp-3.6.9-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/pcp-3.6.9-1.fc16

Comment 10 Fedora Update System 2012-10-25 22:19:36 UTC
pcp-3.6.9-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/pcp-3.6.9-1.el6

Comment 11 Fedora Update System 2012-10-25 22:20:06 UTC
pcp-3.6.9-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/pcp-3.6.9-1.fc17


Note You need to log in before you can comment on or make changes to this bug.