Bug 246485

Summary: returnFileEntries hides /var in "filesystem" package
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: james.antill
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-13 13:41:01 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:

Description Michael Schwendt 2007-07-02 17:08:21 UTC
Using the sqlite packageSack returnFileEntries() method
with the "filesystem" package reveals that the /var directory
entry is not returned because of a bug.

Debugging has lead to a mistake in sqlitesack.py where
the decodefilenamelist() function creates one directory entry
too much because it decodes '/' as a field separator despite a
comment in the source code which says it must not do that. With
'/' as a separator, the OS root directory '/' is encoded
inappropriately, leading to a wrong number of fields.

filenamestring=var/usr/tmp/sys/srv/selinux/sbin/root/proc/opt/mnt/media/lib/hom
e/etc/dev/boot/bin//

Is decoded to:

[u'var', u'usr', u'tmp', u'sys', u'srv', u'selinux', u'sbin', u'root', u'proc', 
u'opt', u'mnt', u'media', u'lib', u'home', u'etc', u'dev', u'boot', u'bin', u'',
 u'']

The latter u'' is duplicate.

As a result, the while loop in the _loadFiles() function processes
two arrays with a non-matching number of elements and ends before
'var' is reached.

$ rpm -q yum
yum-3.2.1-1.fc7

Comment 1 Seth Vidal 2007-08-13 13:41:01 UTC
As far as I can tell filesystem is the only impacted package. However, I've
checked in a simple fix to step around this problem in upstream git and by
comparing the outputs of repoquery -l from before and after on filesystem I've
confirmed it is working. It'll be available in 3.2.3. Thanks for the clear report.


Comment 2 Fedora Update System 2007-08-24 05:34:14 UTC
yum-3.2.3-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.