diff options
author | Jan Safranek <jsafrane@redhat.com> | 2014-04-18 14:59:08 +0200 |
---|---|---|
committer | Jan Safranek <jsafrane@redhat.com> | 2014-04-18 14:59:08 +0200 |
commit | 2786992c6e2acd1b5b1605ca0f6ef30b97a506bd (patch) | |
tree | e2c1ac85f2c9c66787f04954f441b0e5c07a91df /src/software/test | |
parent | f37b77a6ae3b4eca619158503135790ebfd84fcd (diff) | |
download | openlmi-providers-2786992c6e2acd1b5b1605ca0f6ef30b97a506bd.tar.gz openlmi-providers-2786992c6e2acd1b5b1605ca0f6ef30b97a506bd.tar.xz openlmi-providers-2786992c6e2acd1b5b1605ca0f6ef30b97a506bd.zip |
User 'yum repolist -v' instead of 'yum repoinfo'.
yum repoinfo is available only in newer yum. Surprisingly, they habe the
same output.
Diffstat (limited to 'src/software/test')
-rw-r--r-- | src/software/test/repository.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/software/test/repository.py b/src/software/test/repository.py index bb9b84c..63fa9d3 100644 --- a/src/software/test/repository.py +++ b/src/software/test/repository.py @@ -295,7 +295,7 @@ def _parse_repo_file(repo_name): def make_repo(repo_info, packages=None): """ - Makes a Repository instance from string dumped by yum repoinfo command. + Makes a Repository instance from string dumped by yum repolist command. """ metadata = defaultdict(lambda : None) metadata["base_urls"] = [] @@ -343,7 +343,7 @@ def make_repo(repo_info, packages=None): def get_repo_list(kind='all'): if kind.lower() not in ('all', 'enabled', 'disabled'): raise ValueError('kind must be on of {"all", "enabled", "disabled"}') - cmd = ["yum", "-q", "repoinfo", "all"] + cmd = ["yum", "-q", "repolist", "-v", "all"] env = os.environ.copy() env['LC_ALL'] = 'C' return list( @@ -357,7 +357,7 @@ def get_repo_database(): :rtype: list """ result = [] - cmd = ["yum", "-q", "repoinfo", "all"] + cmd = ["yum", "-q", "repolist", "-v", "all"] env = os.environ.copy() env['LC_ALL'] = 'C' repo_infos = util.check_output(cmd, env=env).decode('utf-8') |