From 39f1d45dffbc51a8419d61a4b5e6f36584fb0760 Mon Sep 17 00:00:00 2001 From: jenkins Date: Tue, 19 Jul 2022 16:29:06 +0000 Subject: [PATCH] profiles/coreos/base: slsa: return when disabled and use die() --- .../profiles/coreos/base/profile.bashrc.slsa-provenance | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance index 376f9e1278..384e14d542 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance @@ -12,6 +12,7 @@ cros_post_src_configure_enable_slsa_provenance_report() { if [ "${GENERATE_SLSA_PROVENANCE:-}" != "true" ] ; then einfo "Provenance generation not requested by build; skipping." + return 0 fi export __slsa_provenance_report="yes" } @@ -49,8 +50,7 @@ __slsa_provenance_materials() { elif [ -f "$(portageq get_repo_path ${ROOT:-/} portage-stable)/${ebuild}" ] ; then repo="portage-stable" else - eerror "SLSA provenance: Unable to detect ebuild repository for package '${ebuild}'" - exit 1 + die "SLSA provenance: Unable to detect ebuild repository for package '${ebuild}'" fi einfo " Provenance: recording ebuild material (input) '${repo}/${ebuild}'" @@ -93,8 +93,7 @@ __slsa_provenance_materials() { prev_uri="${uri}" done if [ "${found}" != "true" ] ; then - eerror "No SRC_URI found for source '${src}', unable to record provenance!" - exit 1 + die "No SRC_URI found for source '${src}', unable to record provenance!" fi done elif [ -n "${EGIT_REPO_URI:-}" ] ; then