Bug 522032 - yum-3.2.24 can't find some provides from repository
Summary: yum-3.2.24 can't find some provides from repository
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-09 08:35 UTC by Fajar A. Nugraha
Modified: 2014-01-21 23:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 19:06:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Fajar A. Nugraha 2009-09-09 08:35:32 UTC
Description of problem:
yum-3.2.24 can't find some provides from package in repository.
One of the result is it's unable to perform update on some of my systems (this is harder to reproduce, so this bugreport will focus on finding provides instead (which is easier to reproduce)

How reproducible:
Always, for certain packages.

Steps to Reproduce:
1. Install RHEL5 x86_64 fully up to date, install yum-3.2.24
2. yum -d9 --noplugins provides /lib64/security/pam_loginuid.so
  
Actual results:
# yum -d9 --noplugins provides /lib64/security/pam_loginuid.so
Config time: 0.027
Yum Version: 3.2.24
COMMAND: yum -d9 --noplugins provides /lib64/security/pam_loginuid.so 
Installroot: /
Ext Commands:

   /lib64/security/pam_loginuid.so
Setting up Package Sacks
base                                                                                                                                 | 1.1 kB     00:00     
dag                                                                                                                                  |  951 B     00:00     
epel                                                                                                                                 | 2.3 kB     00:00     
local                                                                                                                                |  951 B     00:00     
updates                                                                                                                              | 1.1 kB     00:00     
pkgsack time: 0.459
Reading Local RPMDB
rpmdb time: 0.007
Searching pkgSack for dep: /lib64/security/pam_loginuid.so
Importing additional filelist information
Searching 0 packages
pam-0.99.6.2-6.el5.x86_64 : A security tool which provides authentication for applications
Repo        : installed
Matched from:
Other       : Provides-match: /lib64/security/pam_loginuid.so



Expected results:
This is from the same server, with yum-3.2.23
# yum -d9 --noplugins provides /lib64/security/pam_loginuid.so
Config time: 0.029
Yum Version: 3.2.23
COMMAND: yum -d9 --noplugins provides /lib64/security/pam_loginuid.so 
Installroot: /
Ext Commands:

   /lib64/security/pam_loginuid.so
Setting up Package Sacks
base                                                                                                                                 | 1.1 kB     00:00     
dag                                                                                                                                  |  951 B     00:00     
epel                                                                                                                                 | 2.3 kB     00:00     
local                                                                                                                                |  951 B     00:00     
updates                                                                                                                              | 1.1 kB     00:00     
pkgsack time: 0.358
Reading Local RPMDB
rpmdb time: 0.007
Searching pkgSack for dep: /lib64/security/pam_loginuid.so
Importing additional filelist information
Potential match for /lib64/security/pam_loginuid.so from pam-0.99.6.2-3.14.el5.x86_64
Potential match for /lib64/security/pam_loginuid.so from pam-0.99.6.2-6.el5.x86_64
Searching 2 packages
searching package pam-0.99.6.2-3.14.el5.x86_64
searching in provides entries
pam-0.99.6.2-3.14.el5.x86_64 : A security tool which provides authentication for applications
Repo        : base
Matched from:
Filename    : /lib64/security/pam_loginuid.so



searching package pam-0.99.6.2-6.el5.x86_64
searching in provides entries
pam-0.99.6.2-6.el5.x86_64 : A security tool which provides authentication for applications
Repo        : updates
Matched from:
Filename    : /lib64/security/pam_loginuid.so



pam-0.99.6.2-6.el5.x86_64 : A security tool which provides authentication for applications
Repo        : installed
Matched from:
Other       : Provides-match: /lib64/security/pam_loginuid.so



Additional info:
I use RHEL5, accessing local repository/mirrors.
I'm filing this bug as Fedora bug since yum-3.2.24 is not part of RHEL5 (yet), and should appear it Fedora rawhide first.

Comment 1 James Antill 2009-09-09 16:02:59 UTC
 Trying this on F11 x86_64, with pretty much 3.2.24, I get:

% sudo yum provides /lib64/security/pam_loginuid.so
Loaded plugins: aliases, changelog, presto, security
Importing additional filelist information
pam-1.0.91-6.fc11.x86_64 : An extensible library which provides authentication
                         : for applications
Repo        : fedora
Matched from:
Filename    : /lib64/security/pam_loginuid.so



pam-1.0.91-6.fc11.x86_64 : An extensible library which provides authentication
                         : for applications
Repo        : installed
Matched from:
Other       : Provides-match: /lib64/security/pam_loginuid.so


...can you try doing a "yum clean metadata" with 3.2.24, and seeing if that fixes the provides command (and if it does, does it fix the update)?

Comment 2 James Antill 2009-09-09 16:04:25 UTC
Also did you run the "package-cleanup --problems" etc. commands yum mentioned? It's probably not that but just to make sure.

Comment 3 Fajar A. Nugraha 2009-09-10 06:12:15 UTC
When using F11, I got the same result that you did. However there seems to be a problem with the combination of RHEL/Centos5 and yum-3.2.24. Below are my test result on another system, fresh install, fully uptodate Centos5.

3.2.24 -> only found provides from installed
3.2.23 -> base and installed
3.2.19 -> found two results, from base and installed (confirmed with "yum list pam")

Using 3.2.24
#====================================================================
# yum clean all;yum -d9 provides /lib64/security/pam_loginuid.so
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors
Loading "fastestmirror" plugin
Config time: 0.030
Running "init" handler for "fastestmirror" plugin
Yum Version: 3.2.24
COMMAND: yum -d9 provides /lib64/security/pam_loginuid.so
Installroot: /
Ext Commands:

   /lib64/security/pam_loginuid.so
Setting up Package Sacks
Running "postreposetup" handler for "fastestmirror" plugin
Determining fastest mirrors
 * addons: mirror.unej.ac.id
 * base: mirror.unej.ac.id
 * extras: mirror.unej.ac.id
 * updates: mirror.averse.net
addons                                                                                                                               |  951 B     00:00     
addons/primary                                                                                                                       |  157 B     00:00     
base                                                                                                                                 | 1.1 kB     00:00     
base/primary                                                                                                                         | 1.1 MB     00:00     
base                                                                                                                                              3272/3272
extras                                                                                                                               | 1.1 kB     00:00     
extras/primary                                                                                                                       | 110 kB     00:00     
extras                                                                                                                                              288/288
updates                                                                                                                              |  951 B     00:00     
updates/primary                                                                                                                      | 348 kB     00:11     
updates                                                                                                                                             634/634
pkgsack time: 21.111
Reading Local RPMDB
rpmdb time: 0.004
Searching pkgSack for dep: /lib64/security/pam_loginuid.so
Importing additional filelist information
addons/filelists                                                                                                                     |  150 B     00:00     
base/filelists                                                                                                                       | 3.3 MB     00:00     
base                                                                                                                                              3272/3272
extras/filelists                                                                                                                     | 165 kB     00:00     
extras                                                                                                                                              288/288
updates                                                                                                                              |  951 B     00:00     
updates/primary                                                                                                                      | 348 kB     00:11     
updates                                                                                                                                             634/634
pkgsack time: 21.111
Reading Local RPMDB
rpmdb time: 0.004
Searching pkgSack for dep: /lib64/security/pam_loginuid.so
Importing additional filelist information
addons/filelists                                                                                                                     |  150 B     00:00     
base/filelists                                                                                                                       | 3.3 MB     00:00     
base                                                                                                                                              3272/3272
extras/filelists                                                                                                                     | 165 kB     00:00     
extras                                                                                                                                              288/288
updates/filelists                                                                                                                    | 2.4 MB     00:37
updates                                                                                                                                             634/634
Searching 0 packages
pam-0.99.6.2-4.el5.x86_64 : A security tool which provides authentication for applications
Repo        : installed
Matched from:
Other       : Provides-match: /lib64/security/pam_loginuid.so




Using 3.2.23
#====================================================================
# yum clean all;yum -d9 provides /lib64/security/pam_loginuid.so
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors
Loading "fastestmirror" plugin
Config time: 0.031
Running "init" handler for "fastestmirror" plugin
Yum Version: 3.2.23
COMMAND: yum -d9 provides /lib64/security/pam_loginuid.so 
Installroot: /
Ext Commands:

   /lib64/security/pam_loginuid.so
Setting up Package Sacks
Running "postreposetup" handler for "fastestmirror" plugin
Determining fastest mirrors
 * addons: mirror.nus.edu.sg
 * base: mirror.nus.edu.sg
 * extras: mirror.unej.ac.id
 * updates: mirror.averse.net
addons                                                                                                                               |  951 B     00:00     
addons/primary                                                                                                                       |  157 B     00:00     
base                                                                                                                                 | 1.1 kB     00:00     
base/primary                                                                                                                         | 1.1 MB     00:02     
base                                                                                                                                              3272/3272
extras                                                                                                                               | 1.1 kB     00:00     
extras/primary                                                                                                                       | 110 kB     00:00     
extras                                                                                                                                              288/288
updates                                                                                                                              |  951 B     00:00     
updates/primary                                                                                                                      | 348 kB     00:18     
updates                                                                                                                                             634/634
pkgsack time: 33.784
Reading Local RPMDB
rpmdb time: 0.004
Searching pkgSack for dep: /lib64/security/pam_loginuid.so
Importing additional filelist information
addons/filelists                                                                                                                     |  150 B     00:00     
base/filelists                                                                                                                       | 3.3 MB     00:04     
base                                                                                                                                              3272/3272
extras/filelists                                                                                                                     | 165 kB     00:00     
extras                                                                                                                                              288/288
updates/filelists                                                                                                                    | 2.4 MB     00:52     
updates                                                                                                                                             634/634
Potential match for /lib64/security/pam_loginuid.so from pam-0.99.6.2-4.el5.x86_64
Searching 1 packages
searching package pam-0.99.6.2-4.el5.x86_64
searching in provides entries
pam-0.99.6.2-4.el5.x86_64 : A security tool which provides authentication for applications
Repo        : base
Matched from:
Filename    : /lib64/security/pam_loginuid.so



pam-0.99.6.2-4.el5.x86_64 : A security tool which provides authentication for applications
Repo        : installed
Matched from:
Other       : Provides-match: /lib64/security/pam_loginuid.so





Using 3.2.19 from Centos
#====================================================================
# yum clean all;yum -d9 provides /lib64/security/pam_loginuid.so
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors
Loading "fastestmirror" plugin
Loaded plugins: fastestmirror
Config time: 0.044
Running "init" handler for "fastestmirror" plugin
Yum Version: 3.2.19
COMMAND: yum -d9 provides /lib64/security/pam_loginuid.so
Installroot: /
Ext Commands:

   /lib64/security/pam_loginuid.so
Setting up Package Sacks
Running "postreposetup" handler for "fastestmirror" plugin
Determining fastest mirrors
 * base: mirror.nus.edu.sg
 * updates: mirror.nus.edu.sg
 * addons: mirror.nus.edu.sg
 * extras: mirror.nus.edu.sg
base                                                                                                                                 | 1.1 kB     00:00
primary.xml.gz                                                                                                                       | 248 kB     00:30
http://mirror.nus.edu.sg/centos/5.3/os/x86_64/repodata/primary.xml.gz: [Errno 4] Socket Error: timed out
Trying other mirror.
primary.xml.gz                                                                                                                       | 1.1 MB     00:12
base                                                           3272/3272
updates                                                                                                                              |  951 B     00:00
primary.xml.gz                                                                                                                       | 348 kB     00:01
updates                                                        634/634
addons                                                                                                                               |  951 B     00:00
primary.xml.gz                                                                                                                       |  157 B     00:00
extras                                                                                                                               | 1.1 kB     00:00
primary.xml.gz                                                                                                                       | 110 kB     00:00
extras                                                         288/288
pkgsack time: 90.116
Reading Local RPMDB
rpmdb time: 0.000
Searching pkgSack for dep: /lib64/security/pam_loginuid.so
Importing additional filelist information
filelists.xml.gz                                                                                                                     | 3.3 MB     00:31
base                                                           3272/3272
filelists.xml.gz                                                 0% [                                                     ] 9.9 kB/s |  16 kB     04:05 ETA filelists.xml.gz                                                                                                                     |  24 kB     00:30     
http://mirror.nus.edu.sg/centos/5.3/updates/x86_64/repodata/filelists.xml.gz: [Errno 4] Socket Error: timed out
Trying other mirror.
filelists.xml.gz                                                                                                                     | 2.4 MB     00:30     
updates                                                        634/634
filelists.xml.gz                                                                                                                     |  150 B     00:00     
filelists.xml.gz                                                                                                                     | 165 kB     00:01     
extras                                                         288/288
Potential match for /lib64/security/pam_loginuid.so from pam-0.99.6.2-4.el5.x86_64
Searching 1 packages
searching package pam-0.99.6.2-4.el5.x86_64
searching in provides entries
pam-0.99.6.2-4.el5.x86_64 : A security tool which provides authentication for applications
Matched from:
Filename    : /lib64/security/pam_loginuid.so



pam-0.99.6.2-4.el5.x86_64 : A security tool which provides authentication for applications
Matched from:
Other       : Provides-match: /lib64/security/pam_loginuid.so

Comment 4 James Antill 2009-09-10 19:06:20 UTC
Ok, this proposed for upstream and fixes it for me:

commit 1aaa3aef14c02a91586b2945ea3d96ed30a09bb4
Author: James Antill <james>
Date:   Thu Sep 10 15:04:27 2009 -0400

    Stupid fix for old code, doesn't like bool return from sql py funcs. BZ#5220

diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index b6c14c5..aafa717 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -929,15 +929,17 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
             if file_glob:
                 name_re = re.compile(fnmatch.translate(name))
             def filelist_globber(sql_dirname, sql_filenames):
+                # Note: Can't return bool, because python-2.4/sqlite don't
+                #       like it.
                 files = sql_filenames.split('/')
                 if not file_glob:
-                    return filename in files
+                    return int(filename in files)
 
                 fns = map(lambda f: '%s/%s' % (sql_dirname, f), files)
                 for match in fns:
                     if name_re.match(match):
-                        return True
-                return False
+                        return 1
+                return 0
 
             cache.create_function("filelist_globber", 2, filelist_globber)
             # for all the ones where filenames is multiple files,


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