Bug 1253517 - Yum via python returning incorrect package lists
Yum via python returning incorrect package lists
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum (Show other bugs)
6.7
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Valentina Mukhamedzhanova
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-13 18:56 EDT by Andrew Colin Kissa
Modified: 2016-11-14 07:19 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-03 09:28:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Colin Kissa 2015-08-13 18:56:35 EDT
Description of problem:

When called via a python script the new version of yum in 6.7
is returning incorrect pkgs.available some packages that are
in the repo are not returned as part of the list.


Version-Release number of selected component (if applicable):
yum-3.2.29-69

How reproducible:

from yum import YumBase
yumbase = YumBase()
yumbase.setCacheDir()
yumbase.doLock()
yumbase._getTs()
yumbase._getRpmDB()
yumbase._getRepos(doSetup=True)
yumbase._getSacks()
pkgs = yumbase.doPackageLists(patterns=[])
for pkg in sorted(pkgs.available):
    if pkg.name.startswith('openssh'):
        pkg.name


Steps to Reproduce:

Run the above python snippet in a python terminal.


Actual results:

'openssh-askpass'
'openssh-ldap'


Expected results:

'openssh'
'openssh-clients'
'openssh-server'
'openssh-askpass'
'openssh-ldap'


Additional info:

This will break any scripts that use the yum python modules
directly as the results being returned are incorrect.
Comment 2 Karel Srot 2015-10-12 09:26:26 EDT
Hello Andrew,
according to my testing the result is the same as for yum-3.2.29-60.el6.noarch from RHEL-6.6 and yum-3.2.29-40.el6.noarch from RHEL-6.5. Btw, it matches the output of the
  yum list available openssh\* 
command (there is a missing 'print' at the last line of the reproducer in #c0)

Could you please provide more evidence, e.g. yum version that was working the way you expected? Thank you.
Comment 3 Valentina Mukhamedzhanova 2015-12-03 09:28:44 EST
We can't move forward on this report unless the requested information is provided, so I'm closing this.

Note You need to log in before you can comment on or make changes to this bug.