Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Do not crash when searching for missing groups in Antergos repository…
Browse files Browse the repository at this point in the history
… database
  • Loading branch information
karasu committed Apr 28, 2018
1 parent 971efd2 commit 4593ace
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/download/metalink.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,8 @@ def build_download_queue(alpm, args=None):

antdb = [db for db in handle.get_syncdbs() if 'antergos' == db.name]
antdb = antdb[0]

one_repo_groups_names = ['cinnamon', 'mate', 'mate-extra']

#one_repo_groups = [antdb.read_grp(one_repo_group)
# for one_repo_group in one_repo_groups_names]
one_repo_groups = []
for one_repo_group_name in one_repo_groups_names:
grp = antdb.read_grp(one_repo_group_name)
Expand Down
15 changes: 12 additions & 3 deletions src/pacman/pac.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,22 @@ def install(self, pkgs, conflicts=None, options=None):
# have to ensure we don't clobber the priority of the repos.
repos = OrderedDict()
repo_order = []
one_repo_groups = ['cinnamon', 'mate', 'mate-extra']
db_match = [db for db in self.handle.get_syncdbs()
if 'antergos' == db.name]
antdb = OrderedDict()
antdb['antergos'] = db_match[0]
one_repo_groups = [antdb['antergos'].read_grp(one_repo_group)
for one_repo_group in one_repo_groups]

one_repo_groups_names = ['cinnamon', 'mate', 'mate-extra']
one_repo_groups = []
for one_repo_group_name in one_repo_groups_names:
grp = antdb['antergos'].read_grp(one_repo_group_name)
if not grp:
grp = ['None', []]
logging.warning(
"Error reading group '%s' from the antergos repo db",
one_repo_group_name)
one_repo_groups.append(grp)

one_repo_pkgs = {pkg for one_repo_group in one_repo_groups
for pkg in one_repo_group[1] if one_repo_group}

Expand Down

0 comments on commit 4593ace

Please sign in to comment.