Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Dict Str Str Str Str Str Str Str Str Str NameLoad NameLoad Str Assign NameStore Dict Str Str Str Str Str Str Str NameLoad NameLoad Str ClassDef bases NameLoad body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore TupleLoad NameLoad NameLoad Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareNotEq Call NameLoad NameLoad Num body Assign NameStore Str Raise Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If BoolOpAnd UnaryOpNot SubscriptLoad NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num For NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Break Assign NameStore Call NameLoad Str keyword ListLoad TupleLoad NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword Num keyword ListLoad NameLoad keyword ListLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr ListLoad NameLoad decorator_list NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return With Call NameLoad NameLoad NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Continue Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Continue If CompareIn Str Call AttributeLoad NameLoad attr Str body If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad orelse If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list
N/A N/A sys N/A os N/A re exceptions InvalidCommand action CmdAction task Task cmd_run Run N/A opt_show_all N/A name short long type default help show_all a all bool False display all files (not only from within CWD path) N/A opt_keep_trace N/A name long type default help keep_trace keep bool False save strace command output into strace.txt Strace N/A Run N/A N/A doc_purpose use strace to list file_deps and targets N/A doc_usage TASK N/A doc_description 
The output is a list of files prefixed with 'R' for open in read mode
or 'W' for open in write mode.
The files are listed in chronological order.

This is a debugging feature with many limitations.
  * can strace only one task at a time
  * can only strace CmdAction
  * the process being traced itself might have some kind of cache,
    that means it might not write a target file if it exist
  * does not handle chdir

So this is NOT 100% reliable, use with care!
 N/A cmd_options N/A opt_show_all opt_keep_trace N/A TRACE_CMD strace -f -e trace=file %s 2>>%s  N/A TRACE_OUT strace.txt execute N/A N/A self params args N/A N/A N/A remove existing output file if any and do sanity checking N/A N/A N/A N/A os path exists N/A self TRACE_OUT N/A N/A N/A N/A os unlink N/A self TRACE_OUT N/A N/A N/A len args 1 N/A N/A msg doit strace failed, must select *one* task to strace.
Check `doit help strace`. N/A N/A InvalidCommand msg N/A result N/A N/A Run execute self params args N/A N/A N/A N/A params N/A keep_trace N/A N/A N/A os path exists N/A self TRACE_OUT N/A N/A N/A N/A os unlink N/A self TRACE_OUT N/A result N/A _execute N/A N/A self show_all N/A N/A N/A 1) wrap the original action with strace and save output in file
           2) add a second task that will generate the report from temp file
         N/A selected N/A N/A self sel_tasks N/A 0 N/A task N/A self task_list N/A N/A N/A N/A task name selected N/A N/A N/A N/A self wrap_strace task N/A N/A report_strace N/A Task strace_report actions N/A N/A find_deps N/A N/A self outstream N/A self TRACE_OUT show_all verbosity 2 task_dep N/A selected uptodate N/A False N/A N/A N/A N/A self task_list append report_strace N/A N/A N/A N/A self sel_tasks append N/A report_strace name N/A N/A N/A Run _execute self N/A sys stdout N/A wrap_strace N/A N/A cls task N/A N/A N/A wrap task actions into strace command N/A wrapped_actions N/A N/A action N/A task actions N/A N/A N/A isinstance action CmdAction N/A N/A cmd N/A N/A cls TRACE_CMD N/A N/A action _action N/A cls TRACE_OUT N/A wrapped N/A CmdAction cmd task save_out N/A action save_out N/A N/A N/A wrapped_actions append wrapped N/A N/A N/A N/A wrapped_actions append action N/A N/A task _action_instances wrapped_actions N/A N/A N/A task _extend_uptodate N/A False N/A classmethod N/A find_deps N/A N/A outstream strace_out show_all N/A N/A N/A read file witn strace output, return dict with deps, targets N/A regex N/A N/A re compile N/A .*\("(?P<file>[^"]*)",  (\[.*\])*(?P<mode>[^)]*)\) = [^-].* N/A read N/A set N/A write N/A set N/A cwd N/A N/A os getcwd N/A N/A N/A N/A N/A os path exists strace_out N/A N/A N/A N/A open strace_out text N/A N/A line text N/A N/A match N/A N/A regex match line N/A N/A match N/A N/A N/A rel_name N/A N/A match group file N/A name N/A N/A N/A os path abspath rel_name N/A N/A show_all N/A N/A N/A N/A N/A name startswith cwd N/A N/A N/A N/A WR N/A N/A match group mode N/A N/A N/A name write N/A N/A N/A N/A write add name N/A N/A N/A outstream write N/A W %s
 name N/A N/A N/A name read N/A N/A N/A N/A read add name N/A N/A N/A outstream write N/A R %s
 name N/A