Bug 246485 - returnFileEntries hides /var in "filesystem" package
Summary: returnFileEntries hides /var in "filesystem" package
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-02 17:08 UTC by Michael Schwendt
Modified: 2014-01-21 22:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-13 13:41:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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