[xml] using src.rpm with non-default Python?

(I hope this is not OT, my RPM foo is low. I am trying to debug a libxml2/libxslt 
problem) ..

I am trying to debug a stylesheet problem, where I get this error:

runtime error: file /home/bkc/src/eclipse/main24/tal2xslt/tal2xslt/xsl/tal2xslt. xsl 
line 450 element copy-of
Attribute nodes must be added before any child nodes to an element.

I do know what this means, but I'm stumped trying to figure out how to debug it.

My stylesheet is complex, and this particular template could be called from 
several different places via apply-templates. 

It would be handy to know the name of the output element that already has 
children, the names and values of the attributes already applied to that element (if 
any), the name of the attribute that is trying to be created, and the name(s) of 
child elements that already exist.

So I thought I'd try modifying libxslt/transform.c to see if I could output at least 
some of the above data in the error message.

I'm using RHEL4, but Python 2.4 is installed as an alternate install, so it's in 

When I install libxml2-2.6.28-1.src.rpm (via rpmbuild --rebuild), it picks up the 
system python  (version 2.3)

To work around this, after installing the source rpms for libxml2 and libxslt, I've 
been rebuilding libxml2-python-2.6.21 with python2.4. I know that libxml2-python-
2.6.21 is quite old.

Another issue is that xsltproc does not generate the error when performing a 
transform, however my Python application does generate the error, even though I 
think the parameters and input files are exactly the same.

So I am thinking that maybe using libxml2-python-2.6.21 isn't doing what I expect, 
and that I'm still getting some other version of libxslt via python2.4 (but I only see 
one libxslt.so* file on my system)

(I couldn't find a way from the python bindings to determine what version of 
libxml2 and libxslt was actually being loaded)

So I've installed the source rpms and modified the error message in 
libxslt/transform.c and now I want to rebuild from the SPEC file and this time tell 
configure to use the alternate python, then install and this way I should be sure 
that python2.4 gets the correct, current bindings for libxslt.

I added this to libxml2.spec

%configure --with-python=/usr/local/bin/python2.4

during rebuild, I see at the top of config.log


that looks good to me. But the build fails with this at the end:

Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /bin/sh /usr/bin/python libxml2 = 2.6.27 pkgconfig zlib-devel
Processing files: libxml2-python-2.6.27-1
error: File not found by glob: /var/tmp/libxml2-2.6.27-root/usr/lib/python*/site-
error: File not found by glob: /var/tmp/libxml2-2.6.27-root/usr/lib/python*/site-
error: File not found by glob: /var/tmp/libxml2-2.6.27-root/usr/lib/python*/site-

Why is configure not looking in the correct directory? does it not know to copy 
from /usr/local when creating the temporary working files?


Perhaps the better question is, when using the src rpms (or even the binary 
rpms), how can I get support for alternate python installs on linux?

Brad Clements,                bkc murkworks com    (315)268-1000
AOL-IM or SKYPE: BKClements

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]