From 5275eb360ab0b5d39f20b32fc1308d262e2b4da0 Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Thu, 16 Dec 2021 20:52:20 +0000 Subject: [PATCH] autobuild: fix execl: Argument list too long Put copying of raw_files into separate script. git-svn-id: svn://kolibrios.org@9429 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/data/Tupfile.lua b/data/Tupfile.lua index b7124a9757..63826db913 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -926,7 +926,7 @@ end tup.append_table(raw_files, extra_files) -make_raw_command = '^ MKIMG kolibri.raw^ ' -- for tup: don't write full command to logs +make_raw_command = '^ MKRAW kolibri.raw^ ' -- for tup: don't write full command to logs make_raw_command = make_raw_command .. "dd if=/dev/zero of=kolibri.raw bs=1MiB count=128 2>&1" make_raw_command = make_raw_command .. " && parted --script kolibri.raw mktable gpt" make_raw_command = make_raw_command .. " && parted --script kolibri.raw unit MiB mkpart primary fat32 1 127" @@ -967,11 +967,17 @@ for _, dir in pairs(raw_dirs) do make_raw_command = make_raw_command .. ' && mmd -i kolibri.raw@@1M "::' .. dir .. '"' end +-- Put copying of raw_files into separate script to avoid 'execl: Argument list too long' +make_raw_command2 = "true" -- copy files for i,v in ipairs(raw_files) do local_file = v[2] - make_raw_command = make_raw_command .. ' && mcopy -moi kolibri.raw@@1M "' .. local_file .. '" "::' .. v[1] .. '"' + make_raw_command2 = make_raw_command2 .. ' && mcopy -moi kolibri.raw@@1M "' .. local_file .. '" "::' .. v[1] .. '"' end +make_raw_command2_file = "make_raw_command2_file" +tup.definerule{inputs = {}, command = "echo '" .. make_raw_command2 .. "' > " .. make_raw_command2_file, outputs = {make_raw_command2_file}} + +table.insert(input_deps, make_raw_command2_file) -- generate tup rule for kolibri.raw -tup.definerule{inputs = input_deps, command = make_raw_command, outputs = {"kolibri.raw"}} +tup.definerule{inputs = input_deps, command = make_raw_command .. " && bash " .. make_raw_command2_file, outputs = {"kolibri.raw"}}