Description of problem:
I had several Copr .repo files with enabled=0 that are dead repos and produce 404 errors when queried. PackageKit-command-not-found was taking very long and I realized it was because it was querying these disabled repos every time and getting "cannot update repo. All mirrors were tried" errors.
For example: https://paste.fedoraproject.org/524964/42449148/raw/
Don't try to query repos that are disabled.
My installed PackageKit version:
PackageKit.x86_64 1.1.5-0.1.20161221.fc25 @updates
PackageKit-Qt.x86_64 0.9.5-6.fc24 @System
PackageKit-Qt5.x86_64 0.9.5-6.fc24 @System
PackageKit-command-not-found.x86_64 1.1.5-0.1.20161221.fc25 @updates
PackageKit-glib.i686 1.1.5-0.1.20161221.fc25 @updates
PackageKit-glib.x86_64 1.1.5-0.1.20161221.fc25 @updates
PackageKit-gstreamer-plugin.x86_64 1.1.5-0.1.20161221.fc25 @updates
PackageKit-gtk3-module.i686 1.1.5-0.1.20161221.fc25 @updates
PackageKit-gtk3-module.x86_64 1.1.5-0.1.20161221.fc25 @updates
Do they have enabled_metadata=1 set?
Yeah, it looks like enabled_metadata=1 was probably set in them. Is changing that the solution? It also just occurred to me that maybe this is desired behavior and when the missing command is found in a disabled repo packagekit could offer to enable the repo and install the package which sounds reasonable. My only problem was that the dead repos were causing command-not-found to take a really long time to run so I just deleted the .repo files.
Right, PackageKit looks at both enabled=1 and enabled_metadata=1 repos so that it could offer to enable the repo if it finds a match in there. Deleting sounds like a good way to solve this :) Setting enabled_metadata to 0 would also fix it.
Thanks for the info!