Bug 519264

Summary: command-not-found insists on downloading file lists all the time
Product: [Fedora] Fedora Reporter: Matthias Clasen <mclasen>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: ffesti, james.antill, maxamillion, pmatilai, rhughes, richard, smparrish, sundaram, tla
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: 2009-09-01 19:41:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 473302    

Description Matthias Clasen 2009-08-25 21:02:58 UTC
This really reduces the usefulness, and turns a possibly nice feature into an annoyance.

I have heard different things about this problems:

- The PackageKit side claims that yum makes it impossible to not download those file lists

- The yum side says it would be easy to do, just ask for help


This bug is an attempt to come to the bottom of this.

Comment 1 Richard Hughes 2009-08-26 07:35:48 UTC
I'm sure using rawhide would not be an ideal testing ground, given that there's so much package churn. Never-the-less, we should try to fix things here.

The key problem is that c-n-f does a SearchFile(~installed) for the missing file. This means updating file lists, as the file lists are not normally downloaded when we do normal operations like getting the updates, updating and installing new software.

Once a week PackageKit will try to download the file lists when the user session goes idle, but if the file lists are out of date, yum insists on downloading them, unless we mark the system as offline.

I guess we could set the permitted age of the cache file, so we only get the file lists when we really need them (missing) rather than just a bit out of date. At the moment we do:

                repo.metadata_expire = 60 * 60 * 1.5 # 1.5 hours, the default
                repo.mdpolicy = "group:primary"

if we're strict, and:

                repo.metadata_expire = 60 * 60 * 24  # 24 hours
                repo.mdpolicy = "group:all"

If we're lazy. James had ideas about what PackageKit was doing wrong here.

Comment 2 seth vidal 2009-08-26 11:35:58 UTC
So I took a look at what was actually causing the filelists to be downloaded.

b/c group:primary should do the right thing.

There was an, apparently old, bug in searchFiles() in sqlitesack that was never doing the simple check to see if the name being searched for was in the primarydb files.

this patch fixes that problem and makes the ultra-common and ultra-simple case of no globs and file in *bin/*, /etc/* match w/o every getting the filelists downloaded.

http://skvidal.fedorapeople.org/misc/fix-searchprimary-files.patch

Comment 3 Matthias Clasen 2009-08-29 17:33:06 UTC
So, should this be moved to yum then ?

Comment 4 Richard Hughes 2009-08-30 08:17:03 UTC
(In reply to comment #3)
> So, should this be moved to yum then ?  

Yup, reassigning. We can use this bug to track when a fixed yum hits rawhide.

Comment 5 seth vidal 2009-08-31 20:55:57 UTC
yum 3.2.23-15.fc12 has this fix.

It's in koji now - will be in rawhide shortly.