From 0972d98507e78ab45471ccaceb6c97ef209d1fb8 Mon Sep 17 00:00:00 2001 From: "Xiaoli Ai(Alice)" Date: Thu, 21 Nov 2024 10:55:08 +0800 Subject: [PATCH] Support extract_as_repo for SLM pxe tar file --- script/cfg.py | 4 ++++ script/scriptgen.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/script/cfg.py b/script/cfg.py index 79e9a74..3b360ed 100644 --- a/script/cfg.py +++ b/script/cfg.py @@ -72,9 +72,11 @@ def rsync_commands(checksum): asset_folder=other [[ ! $dest =~ \.iso$ ]] || asset_folder=iso [[ ! $dest =~ \.spdx\.json$ ]] || asset_folder=iso + [[ ! $dest =~ \.install\.tar$ ]] || asset_folder=iso [[ ! $dest =~ \.(qcow2|raw|vhd|vmdk|vhdx|xz)$ ]] || asset_folder=hdd ''' + rsync_commands(checksum) + ''' repo0folder=${dest%.iso} + repo0folder=${repo0folder%.tar} ''' + (repo0folder if repo0folder else "") + ''' [ -z "FLAVORASREPOORS" ] || [ $( echo "$flavor" | grep -E -c "^(FLAVORASREPOORS)$" ) -eq 0 ] || echo "[ -d /var/lib/openqa/factory/repo/$repo0folder ] || { mkdir /var/lib/openqa/factory/repo/$repo0folder @@ -290,6 +292,8 @@ def openqa_call_start_ex(checksum): echo \" ''' + openqa_call_start_ex1(checksum, 'ISO') + '''\" elif [[ $destiso =~ \.spdx.json$ ]]; then echo \" ''' + openqa_call_start_ex1(checksum, 'ISO') + '''\" + elif [[ $destiso =~ \.install\.tar$ ]]; then + echo \" ''' + openqa_call_start_ex1(checksum, 'ISO') + '''\" elif [[ $destiso =~ \.(hdd|qcow2|raw|raw\.xz|raw\.gz|vhdx\.xz|vmdk|vmdk\.xz)$ ]]; then echo \" ''' + openqa_call_start_ex1(checksum, 'HDD_1') + '''\" elif [ -n "$destiso" ]; then diff --git a/script/scriptgen.py b/script/scriptgen.py index 7c6020e..d7f58ae 100644 --- a/script/scriptgen.py +++ b/script/scriptgen.py @@ -562,6 +562,8 @@ def gen_read_files(self, f): "", "Media1?.iso$", iso, + "(Media1?|install.*).iso$", + iso, ) elif self.media1 != "0": self.p(cfg.read_files_iso, f, "FOLDER", self.iso_folder.get(iso, ""), "SRCISO", iso)