[why] when the job.yaml like multi-qemu.yaml: multi-qemu-0: multi-qemu-1: the code need multi-qemu, not multi-qemu-x, and scheduler can not find the depends_initrd multi-qemu-x.cgz.
Signed-off-by: Li Ping 15396232681@163.com --- src/lib/job.cr | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 1e44d15..a0d7263 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -399,6 +399,9 @@ class Job if @hash["pp"]? program_params = @hash["pp"].as_h program_params.keys.each do |program| + if program =~ /(.*)(-\d{1,}$)/ + program = $1 + end deps_dest_file = "#{SRV_INITRD}/deps/#{mount_type}/#{os_dir}/#{program}.cgz" pkg_dest_file = "#{SRV_INITRD}/pkg/#{mount_type}/#{os_dir}/#{program}.cgz"
@@ -412,8 +415,8 @@ class Job end end
- self["initrd_deps"] = initrd_deps_arr.join(" ") - self["initrd_pkg"] = initrd_pkg_arr.join(" ") + self["initrd_deps"] = initrd_deps_arr.uniq!.join(" ") + self["initrd_pkg"] = initrd_pkg_arr.uniq!.join(" ") end
def update_tbox_group(tbox_group)