Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkglistgen/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def do_handle_update_repos(self, subcmd, opts, project):
@cmdln.option('--only-release-packages', action='store_true', help='Generate 000release-packages only')
@cmdln.option('--only-update-weakremovers', action='store_true', help='Update weakremovers.inc file only')
@cmdln.option('--custom-cache-tag', help='add custom tag to cache dir to avoid issues when running in parallel')
@cmdln.option('--proceed-on-dirty', default=False, action='store_true', help='Package lists are best generated when the target project '
'is done building and is clean. Toggling this option allows the script to keep computing even if the target project is '
'still building or is dirty.')
def do_update_and_solve(self, subcmd, opts):
"""${cmd_name}: update and solve for given scope

Expand Down Expand Up @@ -112,7 +115,8 @@ def solve_project(project, scope: str):
only_release_packages=opts.only_release_packages,
only_update_weakremovers=opts.only_update_weakremovers,
stop_after_solve=opts.stop_after_solve,
custom_cache_tag=opts.custom_cache_tag)
custom_cache_tag=opts.custom_cache_tag,
exit_on_dirty=not opts.proceed_on_dirty)
except MismatchedRepoException:
logging.error("Failed to create weakremovers.inc due to mismatch in repos - project most likey started building again!")
# for stagings we have to be strict on the exit value
Expand Down
6 changes: 5 additions & 1 deletion pkglistgen/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ def update_and_solve_target(
stop_after_solve: bool,
custom_cache_tag,
engine: Engine,
exit_on_dirty=True,
):
self.all_architectures = target_config.get('pkglistgen-archs').split(' ')
self.use_newest_version = str2bool(target_config.get('pkglistgen-use-newest-version', 'False'))
Expand Down Expand Up @@ -698,7 +699,10 @@ def update_and_solve_target(
repository=[main_repo], multibuild=True))
if len(root.xpath('result[@state="building"]')) or len(root.xpath('result[@state="dirty"]')):
logging.info(f'{project}/{product_package} build in progress')
return
if exit_on_dirty:
return
else:
logging.info('--proceed-on-dirty has been set, continuing...')
if git_url:
git_url_base, *fragment = git_url.split('#')
if os.path.exists(f"{cache_dir}/.git"):
Expand Down