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
This commit is contained in:
Ivan Baravy 2021-12-16 20:52:20 +00:00
parent af05642a48
commit 5275eb360a

View File

@ -926,7 +926,7 @@ end
tup.append_table(raw_files, extra_files) 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 .. "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 mktable gpt"
make_raw_command = make_raw_command .. " && parted --script kolibri.raw unit MiB mkpart primary fat32 1 127" 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 .. '"' make_raw_command = make_raw_command .. ' && mmd -i kolibri.raw@@1M "::' .. dir .. '"'
end end
-- Put copying of raw_files into separate script to avoid 'execl: Argument list too long'
make_raw_command2 = "true"
-- copy files -- copy files
for i,v in ipairs(raw_files) do for i,v in ipairs(raw_files) do
local_file = v[2] 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 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 -- 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"}}