Skip to content

Commit

Permalink
Merge pull request #2751 from coolo/change_reference
Browse files Browse the repository at this point in the history
pkglistgen: If the groups contain a summary-staging.txt evaluate it
  • Loading branch information
coolo authored Mar 15, 2022
2 parents 6cacf36 + 1f85a4a commit 0bbf3b2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkglistgen/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,23 @@ def update_and_solve_target(self, api, target_project, target_config, main_repo,
self.build_stub(product_dir, 'kiwi')
self.commit_package(product_dir)

# new way
reference_summary = os.path.join(group_dir, f'summary-{scope}.txt')
if os.path.isfile(reference_summary):
summary_file = os.path.join(product_dir, f'summary-{scope}.txt')
output = []
for group in summary:
for package in sorted(summary[group]):
output.append(f'{package}:{group}')

with open(summary_file, 'w') as f:
for line in sorted(output):
f.write(line + '\n')

done = subprocess.run(['diff', '-u', reference_summary, summary_file])
return done.returncode

# old way
error_output = b''
reference_summary = os.path.join(group_dir, 'reference-summary.yml')
if os.path.isfile(reference_summary):
Expand Down

0 comments on commit 0bbf3b2

Please sign in to comment.