qubes-core-admin-linux/qubes-rpc/qubes.repos.List

18 lines
391 B
Plaintext
Raw Normal View History

#!/usr/bin/python3
2019-04-08 07:46:28 +00:00
# Records in the output are separated by newlines; fields are separated by \0
# Each record is unique_id:pretty_name:enabled
import dnf
base = dnf.Base()
base.read_all_repos()
first = True
for repo in base.repos.all():
2018-12-09 06:42:46 +00:00
l = [repo.id, repo.name, 'enabled' if repo.enabled else 'disabled']
if not first: print()
first = False
print('\0'.join(l), end='')