depot_download_manager: no mtime update in extract

With the added modification-time support in the libc, the extract tool
requires a timer session, which is not plausible for the purpose of the
program.

This behavior stems from the fact that the libc implicitly writes the
mtime when closing a written file. For this update, it implicitly calls
'clock_gettime', which in turn initializes the timer subsystem within
the libc (creating a timer session).

For the extract tool, the implicitly updated mtime is useless because
the extract tool overwrites this modification time with the mtime stored
in the archive anyway. However, the dependency from a timer service
remains.

This patch explicitly disables the libc's implicit updating of the
file-modification when closing a written file.

Issue #1784
This commit is contained in:
Norman Feske 2019-09-27 17:58:50 +02:00 committed by Christian Helmuth
parent 979d823d85
commit eefe91ee41
1 changed files with 5 additions and 4 deletions

View File

@ -25,10 +25,11 @@ void Depot_download_manager::gen_extract_start_content(Xml_generator &xml,
xml.attribute("verbose", "yes");
xml.node("libc", [&] () {
xml.attribute("stdout", "/dev/log");
xml.attribute("stderr", "/dev/log");
xml.attribute("rtc", "/dev/null");
xml.attribute("cwd", user_path);
xml.attribute("stdout", "/dev/log");
xml.attribute("stderr", "/dev/log");
xml.attribute("rtc", "/dev/null");
xml.attribute("cwd", user_path);
xml.attribute("update_mtime", "no");
});
xml.node("vfs", [&] () {