Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Unable to get the name of the repository from which a package has been installed through the dnf python module functionality.
Version-Release number of selected component (if applicable):
dnf-data-4.0.9.2-1.el7_6.noarch
python2-libdnf-0.22.5-1.el7_6.x86_64
dnf-4.0.9.2-1.el7_6.noarch
libdnf-0.22.5-1.el7_6.x86_64
python2-dnf-4.0.9.2-1.el7_6.noarch
python2-hawkey-0.22.5-1.el7_6.x86_64
Steps to Reproduce:
1. Run this piece of python code on RHEL 7.6 (I haven't tried newer RHEL 7):
import dnf
b = dnf.Base()
b.fill_sack(load_system_repo=True, load_available_repos=False)
for pkg in b.sack.query():
print(pkg, pkg._from_repo)
Actual results:
The name of the repository from which a package has been installed is always @System:
(<hawkey.Package object id 2, GeoIP-1.5.0-13.el7.x86_64, @System>, u'@System')
(<hawkey.Package object id 3, NetworkManager-1:1.12.0-10.el7_6.1.x86_64, @System>, u'@System')
(<hawkey.Package object id 87, dnf-4.0.9.2-1.el7_6.noarch, @System>, u'@System')
...
Expected results:
I expect the repository name to match the repoid from which each package has been installed, e.g. "rhel-7-server-extras-rpms".
Additional info:
Per Dan Mach: "looks like the database doesn't get converted and that's why dnf returns invalid data"
Comment 3RHEL Program Management
2020-03-20 06:29:43 UTC
Development Management has reviewed and declined this request. You may appeal this decision by using your Red Hat support channels, who will make certain the issue receives the proper prioritization with product and development management.
https://www.redhat.com/support/process/production/#howto
Description of problem: Unable to get the name of the repository from which a package has been installed through the dnf python module functionality. Version-Release number of selected component (if applicable): dnf-data-4.0.9.2-1.el7_6.noarch python2-libdnf-0.22.5-1.el7_6.x86_64 dnf-4.0.9.2-1.el7_6.noarch libdnf-0.22.5-1.el7_6.x86_64 python2-dnf-4.0.9.2-1.el7_6.noarch python2-hawkey-0.22.5-1.el7_6.x86_64 Steps to Reproduce: 1. Run this piece of python code on RHEL 7.6 (I haven't tried newer RHEL 7): import dnf b = dnf.Base() b.fill_sack(load_system_repo=True, load_available_repos=False) for pkg in b.sack.query(): print(pkg, pkg._from_repo) Actual results: The name of the repository from which a package has been installed is always @System: (<hawkey.Package object id 2, GeoIP-1.5.0-13.el7.x86_64, @System>, u'@System') (<hawkey.Package object id 3, NetworkManager-1:1.12.0-10.el7_6.1.x86_64, @System>, u'@System') (<hawkey.Package object id 87, dnf-4.0.9.2-1.el7_6.noarch, @System>, u'@System') ... Expected results: I expect the repository name to match the repoid from which each package has been installed, e.g. "rhel-7-server-extras-rpms". Additional info: Per Dan Mach: "looks like the database doesn't get converted and that's why dnf returns invalid data"