Bug 452276 - SQLite file provides fails to match
SQLite file provides fails to match
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-06-20 13:21 EDT by Darrell R. Kresge
Modified: 2014-01-21 18:03 EST (History)
5 users (show)

See Also:
Fixed In Version: yum-3.2.17-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-08-07 15:28:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Darrell R. Kresge 2008-06-20 13:21:00 EDT
Description of problem:

When depsolving for uninstalled providers based on filename, or executing 'yum provides 
/path/to/file', no matches are returned 

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


How reproducible:

Consistently with a new installation and no plugins enabled

Steps to Reproduce:

With the 'provides' subcommand:

# yum -d1 provides /etc/mime.types
# yum -d0 install mailcap -y
# yum -d1 provides /etc/mime.types
mailcap.noarch : Associates helper applications with particular file types.

With the 'install' subcommand: (httpd requires /etc/mime.types)

# yum -d0 install httpd
httpd-2.2.3-5.x86_64 from leenux-fc-base has depsolving problems
  --> Missing Dependency: /etc/mime.types is needed by package httpd-2.2.3-5.x86_64 (leenux-fc-
Error: Missing Dependency: /etc/mime.types is needed by package httpd-2.2.3-5.x86_64 (leenux-fc-
# yum -d0 install mailcap -y
# yum -d0 install httpd
Is this ok [y/N]: 
Exiting on user Command

Actual results:

mailcap is not found as a provider of /etc/mime.types

Additional info:

metadata is valid:

# gunzip -c filelists.xml.gz | grep -C3 /etc/mime.types
<package pkgid="337ea5ff5bfe228beb194aa45bcb1e618d702d2c" name="mailcap" arch="noarch">
  <version epoch="0" ver="2.1.23" rel="1.fc6"/>

sqlite> select P.name,P.version,P.pkgKey from packages P, files F where P.pkgKey=F.pkgKey and 

Possible remedy:

sqlitesack.py has a logic error in short circuiting file based provider lookup.  Globs and filenames 
should both proceed to search filelists.  The current test disallows file lookups which are not globs.

Index: sqlitesack.py
--- sqlitesack.py	(revision 47366)
+++ sqlitesack.py	(working copy)
@@ -761,7 +761,7 @@
         # If it's not a provides or a filename, we are done
         if prcotype != "provides":
             return results
-        if not glob or name[0] != '/':
+        if not glob and name[0] != '/':
             return results
         # If it is a filename, search the primary.xml file info
Comment 1 James Antill 2008-08-07 15:28:24 EDT
 This was fixed in an update, at least 3.2.17-2 will fix it (it was fixed before that but I can't remember which nevr exactly).

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