def update_sig_status(update): """Update build signature status for builds in update.""" global _koji if _koji is None: setup_buildsys() _koji = get_koji(None) for build in update.builds: if not build.signed: build_tags = build.get_tags(_koji) if update.release.pending_signing_tag not in build_tags: click.echo('Build %s was refreshed as signed' % build.nvr) build.signed = True else: click.echo('Build %s still unsigned' % build.nvr)
def update_sig_status(update): """Update build signature status for builds in update.""" global _koji if _koji is None: # We don't want to authenticate to the buildsystem, because this script is often mistakenly # run as root and this can cause the ticket cache to become root owned with 0600 perms, # which will cause the compose to fail when it tries to use it to authenticate to Koji. buildsys.setup_buildsystem(config, authenticate=False) _koji = get_koji(None) for build in update.builds: if not build.signed: build_tags = build.get_tags(_koji) if update.release.pending_signing_tag not in build_tags: click.echo('Build %s was refreshed as signed' % build.nvr) build.signed = True else: click.echo('Build %s still unsigned' % build.nvr)
def test_get_koji(self, get_session): """Ensure that get_koji() returns the response from buildsys.get_session().""" # The argument is not used, so set it to None. k = server.get_koji(None) assert k is get_session.return_value