diff --git a/script/cfg.py b/script/cfg.py index 33d6c82..831c210 100644 --- a/script/cfg.py +++ b/script/cfg.py @@ -309,7 +309,8 @@ def pre_openqa_call_start(repos): openqa_call_start = lambda distri, version, archs, staging, news, news_archs, flavor_distri, meta_variables, assets_flavor, repo0folder, openqa_cli: ''' archs=(ARCHITECTURS) [ ! -f __envsub/files_repo.lst ] || ! grep -q -- "-POOL-" __envsub/files_repo.lst || additional_repo_suffix=-POOL - +declare -a livepatches +livepatches=(NONE) for flavor in {FLAVORALIASLIST,}; do for arch in "${archs[@]}"; do filter=$flavor @@ -326,6 +327,10 @@ def pre_openqa_call_start(repos): [ -n "$iso" ] || [ "$flavor" != "''' + assets_flavor + r'''" ] || buildex=$(grep -o -E '(Build|Snapshot)[^-]*' __envsub/files_asset.lst | head -n 1) [ -n "$iso$build" ] || build=$(grep -h -o -E '(Build|Snapshot)[^-]*' __envsub/Media1*.lst 2>/dev/null | head -n 1 | grep -o -E '[0-9]\.?[0-9]+(\.[0-9]+)*')|| : [ -n "$build" ] || continue + livepatches=($(grep -oP '(?<=kernel-livepatch-)\d+_\d+_\d+-\d+' "/var/lib/openqa/factory/iso/${iso}" | uniq)) + if [ ${#livepatches[@]} -eq 0 ]; then + livepatches=(NONE) + fi buildex=${buildex/.install.iso/} buildex=${buildex/.iso/} buildex=${buildex/.raw.xz/} @@ -342,7 +347,12 @@ def pre_openqa_call_start(repos): } fi # test "$destiso" != "" || continue + for livepatch in "${livepatches[@]}"; do echo "''' + openqa_cli + ''' \\\\\" + if [[ "${livepatch}" != "NONE" ]]; then + echo \" KGRAFT=1 \\\\ + KERNEL_VERSION=${livepatch} \\\\\" + fi ( echo \" DISTRI=$distri \\\\ ARCH=$arch \\\\ @@ -583,6 +593,7 @@ def openqa_call_end(version): echo " FLAVOR=${flavor//Tumbleweed-/} \\\\" ) | LANG=C.UTF-8 sort echo "" + done done done '''