From 055c999af989cd0ec1fd6fa9c01545d6d94fca26 Mon Sep 17 00:00:00 2001
From: Steve Baker <sbaker@redhat.com>
Date: Fri, 24 Mar 2023 09:33:31 +1300
Subject: [PATCH] Always generate checksum files on image builds

Checksums are good, lets provide them.

Change-Id: I5d79f3800966dc8e49a892f1097dcbde619ef9a3
---
 ironic_python_agent_builder/__init__.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ironic_python_agent_builder/__init__.py b/ironic_python_agent_builder/__init__.py
index ad28968..615f207 100644
--- a/ironic_python_agent_builder/__init__.py
+++ b/ironic_python_agent_builder/__init__.py
@@ -81,6 +81,10 @@ def main():
     if args.lzma:
         os.environ['DIB_IPA_COMPRESS_CMD'] = \
             'xz --format=lzma --compress --stdout'
+    # Enable checksum generation by default
+    if 'DIB_CHECKSUM' not in os.environ:
+        os.environ['DIB_CHECKSUM'] = 'sha256'
+
     extra_args = shlex.split(args.extra_args) if args.extra_args else []
     if args.verbose:
         extra_args.append("-x")