Bug 460464
Summary: | xml-rpc call packages.listChannelSourceBySession doesn't parse nvr correctly | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Daniel Mach <dmach> | ||||||||
Component: | Server | Assignee: | Pradeep Kilambi <pkilambi> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Sayli Karmarkar <skarmark> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 510 | CC: | bkearney, bperkins, cperry, mzazrivec | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | sat530 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2009-09-10 20:27:46 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: | 456985 | ||||||||||
Attachments: |
|
Created attachment 315197 [details]
nvr split using rsplit
While this may be a valid bug in Satellite for us to fix, it seems like you need this fixed in RHN Hosted. Can you please confirm one of: 1) You want this fixed in RHN Hosted 2) You want this fixed in Satellite 3) You want this fixed in both RHN Hosted and Satellite If 1, we'll be happy to realign it to them. If 2, we'll triage it and see if we can get it into 530. If 3, we'll clone the bug to Hosted so they can look at it while we look at it and maybe we can fix it in both. Originally, I found this bug on Satellite. Now I tried to reproduce it on Hosted (webqa) and I also got invalid results: ['system', 'config', 'network', '', 'rhel-i386-as-4'] ['net', 'snmp', '5.1.2', '', 'rhel-i386-as-4'] I think that we want 3). Created attachment 319775 [details]
reproducer
Push net-snmp or system-config-* rpm + srpm to the rhel-i386-as-4 channel.
Then setup and run this script.
Result should be lines with [name, version, release, epoch, channel] lists.
Accepting this bug for Satellite 530 and will now clone for RHN Hosted. Ideally once we have the fix, Hosted can just *borrow* it from us. Hosted Bug 466170 - xml-rpc call packages.listChannelSourceBySession doesn't parse nvr correctly has been created. Verified. Create a channel foobar. Pushed 2 packages to channel "foobar". #!/usr/bin/python import xmlrpclib ADDRESS = "rlx-0-22.rhndev.redhat.com" USERNAME = "admin" PASSWORD = "password" rhn = xmlrpclib.Server("http://%s/APP" % ADDRESS) session_id = rhn.packages.login(USERNAME, PASSWORD) pkgs = rhn.packages.listChannelSourceBySession(["foobar"], session_id) for i in pkgs: print i >>> python list-channel-source.py ['nfs-utils-lib', '1.0.6', '10.el4', '', 'foobar'] ['net-snmp', '5.1.2', '18.el4', '', 'foobar'] >>> python list-channel-source.py
['isdn4k-utils', '3.2', '50.1', '', 'sayli-rhel-test']
['isdn4k-utils', '3.2', '50.1', '', 'sayli-rhel-test']
['isdn4k-utils', '3.2', '50.1', '', 'sayli-rhel-test']
['isdn4k-utils', '3.2', '50.1', '', 'sayli-rhel-test']
['yum-rhn-plugin', '0.4.3', '1.el5', '', 'sayli-rhel-test']
['system-config-lvm', '1.0.22', '1.0.el5', '', 'sayli-rhel-test']
['nautilus', '2.16.2', '6.el5', '', 'sayli-rhel-test']
['nautilus', '2.16.2', '6.el5', '', 'sayli-rhel-test']
['nautilus', '2.16.2', '6.el5', '', 'sayli-rhel-test']
['tcsh', '6.14', '12.el5', '', 'sayli-rhel-test']
['anthy', '7900', '4.el5', '', 'sayli-rhel-test']
['anthy', '7900', '4.el5', '', 'sayli-rhel-test']
['anthy', '7900', '4.el5', '', 'sayli-rhel-test']
['readahead', '1.3', '7.el5', '', 'sayli-rhel-test']
['aspell-de', '0.50', '11.2.2', '', 'sayli-rhel-test']
['linuxwacom', '0.7.4.3', '2.el5', '', 'sayli-rhel-test']
...
Moving to release_pending.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1434.html |
Created attachment 315196 [details] nvr split using RE Description of problem: when listing a channel srpms, I get: ['net', 'snmp', '5.1.2', '', 'rhel-i386-as-4'] instead of ['net-snmp', '5.1.2', '12.el4', '', 'rhel-i386-as-4'] Steps to Reproduce: 1. push a srpm with many dashes in it's name to a satellite 2. list sprms via packages.listChannelSourceBySession() I made two patches doing the same thing: - first one uses RE to get n-v-r parts - the second one uses rsplit to get n-v-r Patches were tested on RHEL-5/Python2.4. Just choose the one which would work on all supported satellite versions...