Bug 1225225 - [abrt] python-dnf: repo.py:774:load:RepoError: Cache-only enabled but no cache for 'fedora'
[abrt] python-dnf: repo.py:774:load:RepoError: Cache-only enabled but no cach...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:d389eba9e72e7e9a83ce881feac...
:
: 1242078 1248458 1252518 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-26 17:18 EDT by bibo
Modified: 2015-09-23 00:13 EDT (History)
12 users (show)

See Also:
Fixed In Version: 1.1.1-2.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-09 19:19:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.02 KB, text/plain)
2015-05-26 17:18 EDT, bibo
no flags Details
File: environ (3.36 KB, text/plain)
2015-05-26 17:18 EDT, bibo
no flags Details

  None (edit)
Description bibo 2015-05-26 17:18:45 EDT
Version-Release number of selected component:
python-dnf-1.0.0-1.fc22

Additional info:
reporter:       libreport-2.5.1
cmdline:        python2 /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py install yumex -d 0 -q -C
executable:     /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py
kernel:         4.0.4-301.fc22.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
repo.py:774:load:RepoError: Cache-only enabled but no cache for 'fedora'

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py", line 189, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py", line 185, in main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1076, in run
    self._process_demands()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 788, in _process_demands
    load_available_repos=lar)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 238, in fill_sack
    self._add_repo_to_sack(r.id)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 100, in _add_repo_to_sack
    repo.load()
  File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 774, in load
    raise dnf.exceptions.RepoError(msg)
RepoError: Cache-only enabled but no cache for 'fedora'

Local variables in innermost frame:
msg: u"Cache-only enabled but no cache for 'fedora'"
self: <Repo fedora>
Comment 1 bibo 2015-05-26 17:18:48 EDT
Created attachment 1030181 [details]
File: backtrace
Comment 2 bibo 2015-05-26 17:18:50 EDT
Created attachment 1030182 [details]
File: environ
Comment 3 Honza Silhan 2015-07-13 07:30:56 EDT
*** Bug 1242078 has been marked as a duplicate of this bug. ***
Comment 4 Honza Silhan 2015-08-11 08:03:02 EDT
*** Bug 1248458 has been marked as a duplicate of this bug. ***
Comment 5 Honza Silhan 2015-08-11 08:04:57 EDT
Igor, can this be fixed, please? It should catch the error and ignore it.
Comment 6 Honza Silhan 2015-08-19 07:09:55 EDT
*** Bug 1252518 has been marked as a duplicate of this bug. ***
Comment 7 Igor Gnatenko 2015-08-19 08:49:00 EDT
diff --git a/dnf/cli/completion_helper.py b/dnf/cli/completion_helper.py
index bf88983..9060751 100644
--- a/dnf/cli/completion_helper.py
+++ b/dnf/cli/completion_helper.py
@@ -19,6 +19,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301  USA
 
+import dnf.exceptions
 import dnf.cli
 import re
 import sys
@@ -184,7 +185,10 @@ def main(args):
     cli.register_command(CleanCompletionCommand)
     cli.register_command(HistoryCompletionCommand)
     cli.configure(args)
-    cli.run()
+    try:
+        cli.run()
+    except dnf.exceptions.Exception:
+        sys.exit(0)
 
 if __name__ == "__main__":
     try:
Comment 9 thearcher 2015-08-26 22:10:43 EDT
Another user experienced a similar problem:

Attempted to use tab-completion while doing a "dnf list libre<tabbing here"

reporter:       libreport-2.6.2
cmdline:        python2 /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py list list libre -d 0 -q -C
event_log:      2015-08-26-22:09:10> ('report_uReport' completed successfully)
executable:     /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py
kernel:         4.1.6-200.fc22.x86_64
package:        python-dnf-1.1.0-2.fc22
reason:         repo.py:793:load:RepoError: Cache-only enabled but no cache for 'fedora'
runlevel:       N 5
type:           Python
uid:            1000
Comment 10 Fedora Update System 2015-09-01 05:51:56 EDT
dnf-plugins-core-0.1.11-1.fc23 dnf-1.1.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743
Comment 11 Fedora Update System 2015-09-01 16:22:35 EDT
dnf-1.1.1-1.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf dnf-plugins-core'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743
Comment 12 Fedora Update System 2015-09-08 08:38:26 EDT
dnf-1.1.1-2.fc22 dnf-plugins-core-0.1.11-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744
Comment 13 Fedora Update System 2015-09-08 08:38:59 EDT
dnf-1.1.1-2.fc22 dnf-plugins-core-0.1.11-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744
Comment 14 Fedora Update System 2015-09-08 08:39:49 EDT
dnf-1.1.1-2.fc23 dnf-plugins-core-0.1.11-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743
Comment 15 Fedora Update System 2015-09-08 13:51:49 EDT
dnf-1.1.1-2.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf dnf-plugins-core'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743
Comment 16 Fedora Update System 2015-09-08 17:26:17 EDT
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugins-core dnf'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744
Comment 17 Fedora Update System 2015-09-09 19:18:39 EDT
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 18 Fedora Update System 2015-09-23 00:12:27 EDT
dnf-1.1.1-2.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 stable 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.