Bug 600036
| Summary: | FTBFS python-lxml-2.2.6-1.fc14 | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | FTBFS <ftbfs> | ||||||||||||||||
| Component: | python-lxml | Assignee: | Jeffrey C. Ollie <jeff> | ||||||||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||
| Severity: | high | Docs Contact: | |||||||||||||||||
| Priority: | high | ||||||||||||||||||
| Version: | 14 | CC: | dmalcolm, jeff, jpopelka | ||||||||||||||||
| Target Milestone: | --- | Keywords: | Triaged | ||||||||||||||||
| Target Release: | --- | ||||||||||||||||||
| Hardware: | All | ||||||||||||||||||
| OS: | Linux | ||||||||||||||||||
| URL: | http://linux.dell.com/files/fedora/FixBuildRequires/mock-results/ | ||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Fixed In Version: | python-lxml-2.3-1.fc15 | Doc Type: | Bug Fix | ||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||
| Last Closed: | 2011-04-26 16:02:58 UTC | Type: | --- | ||||||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||||||
| Documentation: | --- | CRM: | |||||||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||
| Embargoed: | |||||||||||||||||||
| Bug Depends On: | |||||||||||||||||||
| Bug Blocks: | 596849 | ||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
|
Description
FTBFS
2010-06-03 21:19:37 UTC
Created attachment 421019 [details]
root.log
root.log for i386
Created attachment 421020 [details]
build.log
build.log for i386
Created attachment 421021 [details]
mock.log
mock.log for i386
Created attachment 421022 [details]
root.log
root.log for x86_64
Created attachment 421023 [details]
build.log
build.log for x86_64
Created attachment 421024 [details]
mock.log
mock.log for x86_64
Traceback from 2to3 during %prep:
Traceback (most recent call last):
File "/usr/bin/2to3", line 6, in <module>
sys.exit(main("lib2to3.fixes"))
File "/usr/lib/python2.6/lib2to3/main.py", line 165, in main
options.processes)
File "/usr/lib/python2.6/lib2to3/refactor.py", line 613, in refactor
items, write, doctests_only)
File "/usr/lib/python2.6/lib2to3/refactor.py", line 271, in refactor
self.refactor_dir(dir_or_file, write, doctests_only)
File "/usr/lib/python2.6/lib2to3/refactor.py", line 290, in refactor_dir
self.refactor_file(fullname, write, doctests_only)
File "/usr/lib/python2.6/lib2to3/refactor.py", line 653, in refactor_file
*args, **kwargs)
File "/usr/lib/python2.6/lib2to3/refactor.py", line 325, in refactor_file
tree = self.refactor_string(input, filename)
File "/usr/lib/python2.6/lib2to3/refactor.py", line 355, in refactor_string
self.refactor_tree(tree, name)
File "/usr/lib/python2.6/lib2to3/refactor.py", line 389, in refactor_tree
self.traverse_by(self.post_order_heads, tree.post_order())
File "/usr/lib/python2.6/lib2to3/refactor.py", line 413, in traverse_by
new = fixer.transform(node, results)
File "/usr/lib/python2.6/lib2to3/fixes/fix_itertools_imports.py", line 24, in transform
assert child.type == syms.import_as_name
The 2to3 traceback is with python-2.6.5-12 Adding --verbose to invocation of 2to3 indicates the problem is when running on: python3-python-lxml-2.2.6-1.fc14/benchmark/bench_etree.py The issue appears to be the line: from itertools import * I believe the only two names from itertools that are used are "islice" and "repeat", so this could be replaced with: from itertools import islice, repeat Looks like 2to3 could handle this better, if only by giving a better error message. 2to3 issue filed upstream as http://bugs.python.org/issue8892 Created attachment 421061 [details]
Patch the various "from itertools import *"
Attached patch changes various lines of the form
from itertools import *
to instead list the specific names to be imported. I may have got the lists wrong.
With this patch 2to3 from python-2.6.5 works
I've cherrypicked the lib2to3 patch from upstream, rebuilding python into dist-f14-py27-rebuild as python-2.7-6.fc14: http://koji.fedoraproject.org/koji/taskinfo?taskID=2351230 Getting a new error:
Bytecompiling .py files below /builddir/build/BUILDROOT/python-lxml-2.2.6-2.fc14.x86_64/usr/lib64/python3.1/ using /usr/bin/python3.1
*** Error compiling /builddir/build/BUILDROOT/python-lxml-2.2.6-2.fc14.x86_64/usr/lib64/python3.1/site-packages/lxml/html/__init__.py ...
Sorry: IndentationError: unexpected unindent (__init__.py, line 827)
error: Bad exit status from /var/tmp/rpm-tmp.XjRxDR (%install)
Bad exit status from /var/tmp/rpm-tmp.XjRxDR (%install)
RPM build errors:
Child returncode was: 1
EXCEPTION: Command failed. See logs for output.
# ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/python-lxml.spec']
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line 70, in trace
result = func(*args, **kw)
File "/usr/lib/python2.6/site-packages/mock/util.py", line 333, in do
raise mock.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
# ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/python-lxml.spec']
LEAVE do --> EXCEPTION RAISED
Relevant code looks like this:
> def open_http_urllib(method, url, values):
> ## FIXME: should test that it's not a relative URL or something
> try:
> from urllib.parse import urlencode
> from urllib.request import urlopen
> except ImportError: # Python 3
> from urllib.request import urlopen
> from urllib.parse import urlencode
Clearly the "from urllib.request import urlopen" is at the wrong indentation level
To clarify, this is in the generated: /usr/lib64/python3.1/site-packages/lxml/html/__init__.py and looks like another 2to3 bug within the python 2 package. Relevant input code, before 2to3 is invoked:
> def open_http_urllib(method, url, values):
> ## FIXME: should test that it's not a relative URL or something
> try:
> from urllib import urlencode, urlopen
> except ImportError: # Python 3
Filed the 2to3 bug upstream here: http://bugs.python.org/issue9386 Workaround for now may be to fix it up in lxml so the import is two separate lines. I've patched around this in python-lxml for now, as proposed in comment #18 This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle. Changing version to '14'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping python-lxml-2.3-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/python-lxml-2.3-1.fc15 Package python-lxml-2.3-1.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-lxml-2.3-1.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/python-lxml-2.3-1.fc15 then log in and leave karma (feedback). python-lxml-2.3-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. |