diff --git a/kiwi_metainfo_helper b/kiwi_metainfo_helper index 06101d2..21dfc65 100644 --- a/kiwi_metainfo_helper +++ b/kiwi_metainfo_helper @@ -132,10 +132,13 @@ fi if [ -f containers/annotation ]; then REGISTRY_REFNAME="$(sed -n 's/.*\([^<]*\)<.*/\1/p' < containers/annotation)" REGISTRY_DIGEST="$(sed -n 's/.*\(.*\)<.*/\1/p' < containers/annotation)" - sed -i"" \ - -e "s#%BASE_REFNAME%#${REGISTRY_REFNAME}#g" \ - -e "s#%BASE_DIGEST%#${REGISTRY_DIGEST}#g" \ - "${files[@]}" + + if [ -n "$REGISTRY_DIGEST" ]; then + sed -i"" \ + -e "s#%BASE_REFNAME%#${REGISTRY_REFNAME}#g" \ + -e "s#%BASE_DIGEST%#${REGISTRY_DIGEST}#g" \ + "${files[@]}" + fi fi sed -i"" \ diff --git a/obs-service-kiwi_metainfo_helper.changes b/obs-service-kiwi_metainfo_helper.changes index f56fa9d..93d98e0 100644 --- a/obs-service-kiwi_metainfo_helper.changes +++ b/obs-service-kiwi_metainfo_helper.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 30 14:13:12 UTC 2024 - Dirk Müller + +- don't replace %BASE_DIGEST% with empty string when not available + ------------------------------------------------------------------- Wed Sep 25 09:01:19 UTC 2024 - Fabian Vogt