Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520312 - app-arch/rpm should build rpm module for both Python 2.x and 3.x
Summary: app-arch/rpm should build rpm module for both Python 2.x and 3.x
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-08-20 12:14 UTC by Pavel Šimerda
Modified: 2020-10-01 11:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
simple but suboptimal patch (rpm.diff,1.11 KB, text/plain)
2014-08-20 12:14 UTC, Pavel Šimerda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Šimerda 2014-08-20 12:14:43 UTC
Created attachment 383194 [details]
simple but suboptimal patch

app-arch/rpm provides a python rpm library which is used by other tools working with Python 2.x as well as python 3.x. It should definitely be built for both python versions. Attaching a simple and stupid patch that works for me but compiles stuff twice even where it's not needed.
Comment 1 Pavel Šimerda 2014-08-20 12:18:36 UTC
Just a note, the Python 3.x version builds, installs but doesn't work for some reason:

Python 3.3.5 (default, Aug  8 2014, 02:28:43) 
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rpm
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.3/site-packages/rpm/__init__.py", line 9, in <module>
    from rpm._rpm import *
ImportError: No module named 'rpm._rpm'
>>>
Comment 2 Pavel Šimerda 2014-08-20 12:41:15 UTC
(In reply to Pavel Šimerda (pavlix) from comment #1)
> Just a note, the Python 3.x version builds, installs but doesn't work for
> some reason:

This seems to be an upstream issue, I can successfully import the module when building from upstream git. I added the e-builds to the ixit overlay for now:

https://github.com/okias/ixit/blob/master/app-arch/rpm/rpm-4.11.2-r1.ebuild
https://github.com/okias/ixit/blob/master/app-arch/rpm/rpm-9999.ebuild

Cheers,

Pavel
Comment 3 Larry the Git Cow gentoo-dev 2020-10-01 11:17:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bfda681c33a63ebe64a04f5ef0084c3d07990aa

commit 3bfda681c33a63ebe64a04f5ef0084c3d07990aa
Author:     Tony Vroon <chainsaw@gentoo.org>
AuthorDate: 2020-10-01 11:15:19 +0000
Commit:     Tony Vroon <chainsaw@gentoo.org>
CommitDate: 2020-10-01 11:17:52 +0000

    app-arch/rpm: Version bump to 4.16.0
    
    This has USE="zstd" defaulted to on to ensure Fedora 31 packages are
    recognised without issue.
    
    Closes: https://bugs.gentoo.org/520312
    Closes: https://bugs.gentoo.org/730354
    Closes: https://bugs.gentoo.org/740078
    Signed-Off-By: Tony Vroon <chainsaw@gentoo.org>

 app-arch/rpm/Manifest                         |   1 +
 app-arch/rpm/files/rpm-4.16.0-autotools.patch |  13 +++
 app-arch/rpm/files/rpm-4.16.0-libdir.patch    |  34 +++++++
 app-arch/rpm/rpm-4.16.0.ebuild                | 139 ++++++++++++++++++++++++++
 4 files changed, 187 insertions(+)