Skip to content

Commit

Permalink
pkglistgen: After solving check all packages listed
Browse files Browse the repository at this point in the history
If the packages are already part of the modules that are excluded
(due to dependencies), output an ERROR (which is not fatal atm)

Fixes #2541
  • Loading branch information
coolo committed Apr 1, 2021
1 parent e6a45eb commit 35ff3f9
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pkglistgen/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,29 @@ def write_all_groups(self):

def solve_module(self, groupname, includes, excludes, use_recommends):
g = self.groups[groupname]
importants = set()
for i in includes:
g.inherit(self.groups[i])
name = i
if isinstance(i, dict):
name = list(i)[0]
if i[name] != 'support':
importants.add(name)
else:
importants.add(name)
g.inherit(self.groups[name])
g.solve(use_recommends)
for e in excludes:
g.ignore(self.groups[e])
for i in importants:
group = self.groups[i]
for arch in group.packages:
if not arch in g.solved_packages:
continue
for package in group.packages[arch]:
if package[0] in g.solved_packages[arch]:
continue
if not package[0] in g.solved_packages['*']:
self.logger.error(f'Missing {package[0]} in {groupname} for {arch}')

def expand_repos(self, project, repo='standard'):
return repository_path_expand(self.apiurl, project, repo)
Expand Down

0 comments on commit 35ff3f9

Please sign in to comment.