Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3bcd84d

Browse files
AdamWillConan-Kudo
authored andcommitted
Handle removal of dnf.repo._md_expire_cache() in DNF 3.4
DNF 3.4 removed _md_expire_cache(), which we were still using.Let's follow how upstream replaced it, by using the expire()method of the underlying librepo repo object...unfortunatelythis is still using private interfaces, but I don't see a wayto do it using public ones.Signed-off-by: Adam Williamson <awilliam@redhat.com>
1 parentd0d0163 commit3bcd84d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎python/dnfdaemon/server/backend.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ def __init__(self, parent):
6161
defexpire_cache(self):
6262
"""Make the current cache expire"""
6363
forrepoinself.repos.iter_enabled():
64-
repo._md_expire_cache()
64+
# see https://bugzilla.redhat.com/show_bug.cgi?id=1629378
65+
try:
66+
# works up to dnf 3.4 (3.4 took it away)
67+
repo._md_expire_cache()
68+
exceptAttributeError:
69+
# works from libdnf 0.18.0 (I think)
70+
repo._repo.expire()
6571

6672
defsetup_base(self):
6773
"""Setup dnf Sack and init packages helper"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp