#!/bin/bash

# Copyright (c) 2022 SUSE LLC, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

set -euo pipefail

test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile

echo "Configure image: [$kiwi_iname]..."

#======================================
# Setup baseproduct link
#--------------------------------------
if [ ! -e /etc/products.d/baseproduct ]; then
    suseSetupProduct
fi

#======================================
# Import repositories' keys
#--------------------------------------
suseImportBuildKey

sed -i 's/--format-executable/--no-format-executable/' /etc/gemrc

exit 0
