Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 452276 - SQLite file provides fails to match
Summary: SQLite file provides fails to match
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-20 17:21 UTC by Darrell R. Kresge
Modified: 2014-01-21 23:03 UTC (History)
5 users (show)

Fixed In Version: yum-3.2.17-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-07 19:28:24 UTC


Attachments (Terms of Use)

Description Darrell R. Kresge 2008-06-20 17:21:00 UTC
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):

3.2.16

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-
base)
Error: Missing Dependency: /etc/mime.types is needed by package httpd-2.2.3-5.x86_64 (leenux-fc-
base)
# 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"/>
  <file>/etc/mailcap</file>
  <file>/etc/mime.types</file>
  <file>/usr/share/man/man4/mailcap.4.gz</file>
</package>

sqlite> select P.name,P.version,P.pkgKey from packages P, files F where P.pkgKey=F.pkgKey and 
F.name='/etc/mime.types';
mailcap|2.1.23|1579

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 19:28:24 UTC
 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.