dnf changed the type of gpgkey to a tuple
And in an intermediate version it returns a VectorString object which isn't serializable by the json or toml modules. So convert it to a list so that the type is consistent in the sources code.
This commit is contained in:
parent
e1dc54ea8c
commit
e9e5139750
@ -355,7 +355,7 @@ def dnf_repo_to_file_repo(repo):
|
|||||||
it ouputs baseurl and gpgkey as python lists which DNF cannot read. So do this manually with
|
it ouputs baseurl and gpgkey as python lists which DNF cannot read. So do this manually with
|
||||||
only the attributes we care about.
|
only the attributes we care about.
|
||||||
"""
|
"""
|
||||||
repo_str = "[%s]\n" % repo.id
|
repo_str = "[%s]\nname = %s\n" % (repo.id, repo.name)
|
||||||
if repo.metalink:
|
if repo.metalink:
|
||||||
repo_str += "metalink = %s\n" % repo.metalink
|
repo_str += "metalink = %s\n" % repo.metalink
|
||||||
elif repo.mirrorlist:
|
elif repo.mirrorlist:
|
||||||
@ -430,7 +430,7 @@ def repo_to_source(repo, system_source):
|
|||||||
source["check_gpg"] = True
|
source["check_gpg"] = True
|
||||||
|
|
||||||
if repo.gpgkey:
|
if repo.gpgkey:
|
||||||
source["gpgkey_urls"] = repo.gpgkey
|
source["gpgkey_urls"] = list(repo.gpgkey)
|
||||||
|
|
||||||
return source
|
return source
|
||||||
|
|
||||||
@ -484,7 +484,7 @@ def source_to_repo(source, dnf_conf):
|
|||||||
repo.gpgcheck = False
|
repo.gpgcheck = False
|
||||||
|
|
||||||
if "gpgkey_urls" in source:
|
if "gpgkey_urls" in source:
|
||||||
repo.gpgkey = ",".join(source["gpgkey_urls"])
|
repo.gpgkey = tuple(source["gpgkey_urls"])
|
||||||
|
|
||||||
repo.enable()
|
repo.enable()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user