Python interface for RPM works well with python2.3, but it doesn't work with python2.4 due to some PyDictIter_Type unresolved symbol. I believe that problem comes from some difference in C API for python2.3 and python2.4. That is why I have listed this bug for all platforms. For the reference, I have an AMD64 processor. Here is the listing of responses for both python2.3 and python2.4 when rpm module is imported. brcha@tbird2000 ~ $ python2.3 Python 2.3.5 (#1, Sep 12 2005, 17:11:03) [GCC 3.4.4 (Gentoo 3.4.4-r1, HTB-3.4.4-1.00, ssp-3.4.4-1.0, pie-8.7.8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import rpm >>> brcha@tbird2000 ~ $ python2.4 Python 2.4.2 (#1, Oct 2 2005, 01:22:18) [GCC 3.4.4 (Gentoo 3.4.4-r1, HTB-3.4.4-1.00, ssp-3.4.4-1.0, pie-8.7.8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import rpm Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: /usr/lib64/python2.4/site-packages/rpmmodule.so: undefined symbol: PyDictIter_Type >>>
Created attachment 75597 [details] rpm-4.2.1.ebuild updated rpm-4.2.1 ebuild
Created attachment 75598 [details, diff] rpm-4.2.1-python2.4.diff same as rpm-4.2.1-python2.3.diff including: perl -pi -e 's/PyDictIter_Type/PyDictIterValue_Type/' rpm-4.2.1/python/*.c
*** Bug 130729 has been marked as a duplicate of this bug. ***
Note that app-arch/rpm-4.4.1 works fine with python-2.4 : oak ~ # equery -q list -e rpm [I--] [ ] app-arch/rpm-4.4.1 (0) oak ~ # python Python 2.4.2 (#1, May 31 2006, 21:25:21) [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import rpm >>> Check out bug #135854 . Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16.18-xen i686) ================================================================= System uname: 2.6.16.18-xen i686 AMD Athlon(tm) Gentoo Base System version 1.6.14 dev-lang/python: 2.4.2 dev-python/pycrypto: [Not Present] dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-mtune=athlon-xp -O2 -pipe -mno-tls-direct-seg-refs" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mtune=athlon-xp -O2 -pipe -mno-tls-direct-seg-refs" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collinsion-protect distlocks maketest sandbox sfperms strict test" GENTOO_MIRRORS="http://mirror.aarnet.edu.au/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="x86 acl apache2 bash-completion berkdb bitmap-fonts bzip2 cli crypt cups encode expat foomaticdb gdbm gif gpm imlib isdnlog jpeg libg++ libwww mikmod motif mp3 mpeg ncurses nls nptl ogg opengl oss pam pcre pdflib perl png pppd python qt quicktime readline reflection sdl session spell spl ssl symlink sysfs tcpd truetype truetype-fonts type1-fonts udev vorbis xml xml2 xmms xorg xv zlib userland_GNU kernel_linux elibc_glibc" Unset: CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
fixed in rpm-4.4.6 (which is x86 now)
ok, i'll make this resolved. thanks for letting us know.