Red Hat Bugzilla – Bug 1289449
"dnf makecache" crashed on repositories with metadata_expire=never: TypeError: unorderable types: NoneType() <= int()
Last modified: 2015-12-08 09:09:59 EST
After upgrading from Fedora 22 to 23, I receive this Python backtrace on "dnf makecache":
# dnf makecache
Traceback (most recent call last):
File "/usr/bin/dnf", line 57, in <module>
File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
errcode = main(args)
File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
return _main(base, args)
File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main
File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1091, in run
File "/usr/lib/python3.4/site-packages/dnf/cli/commands/makecache.py", line 72, in run
if not is_cache or expires_in <= 0:
TypeError: unorderable types: NoneType() <= int()
This is because the expires_in variable set by r.metadata_expire_in() has None value because my /etc/dnf/dnf.conf has metadata_expire=never in main section.
I have dnf-1.1.4-2.fc23.
With Fedora 22, I set metadata_expire=never to prevent from spurious metadata updates whenever I run dnf and I updated the metadata caches by "dnf makecache" manually when I wanted.
This seems not working with Fedora 23 anymore. Reading manual I'm confused. How can I trigger metadata update only on my discretion? "dnf clean metadata" removes all caches and redownloads even those metadata that have not changed on the server. Is "dnf clean expire-cache" followed by "dnf makecache" with "metadata_expire=never" what I need?
*** This bug has been marked as a duplicate of bug 1289166 ***