(command.CommandList children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(source)} {(DQ (${ Id.VSub_Name PORTAGE_BIN_PATH) (/eapi.sh))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:21) arg_word: {(1)} ) ] ) (C {(shopt)} {(-s)} {(expand_aliases)}) (C {(alias)} {(Id.Lit_VarLike 'save_IFS=') (SQ (Token id: Id.Lit_Chars val: '[ "${IFS:-unset}" != "unset" ] && old_IFS="${IFS}"' span_id: 42 ) ) } ) (C {(alias)} {(Id.Lit_VarLike 'restore_IFS=') (SQ (Token id: Id.Lit_Chars val: 'if [ "${old_IFS:-unset}" != "unset" ]; then IFS="${old_IFS}"; unset old_IFS; else unset IFS; fi' span_id: 49 ) ) } ) (command.ShFunction name: assert body: (command.BraceGroup children: [ (C {(local)} {(x)} {(Id.Lit_VarLike 'pipestatus=') (braced_var_sub token: (Token id:Id.VSub_Name val:PIPESTATUS span_id:66) bracket_op: (bracket_op.WholeArray op_id:Id.Arith_Star) ) } ) (command.ForEach iter_name: x iter_words: [{($ Id.VSub_DollarName '$pipestatus')}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {($ Id.VSub_DollarName '$x')} right: {(0)} ) ) (C {(die)} {(DQ ($ Id.VSub_At '$@'))}) ] ) ] ) ) ] ) ) (command.ShFunction name: __assert_sigpipe_ok body: (command.BraceGroup children: [ (C {(local)} {(x)} {(Id.Lit_VarLike 'pipestatus=') (braced_var_sub token: (Token id:Id.VSub_Name val:PIPESTATUS span_id:180) bracket_op: (bracket_op.WholeArray op_id:Id.Arith_Star) ) } ) (command.ForEach iter_name: x iter_words: [{($ Id.VSub_DollarName '$pipestatus')}] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$x')} right: {(0)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$x')} right: { (braced_var_sub token: (Token id: Id.VSub_Name val: PORTAGE_SIGPIPE_STATUS span_id: 221 ) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(141)} ) ) } ) ) ) ] action: [ (C {(__helpers_die)} {(DQ ($ Id.VSub_At '$@'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:239) arg_word: {(1)} ) ] spids: [204 229] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$x')} right: {(0)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:266) ) ] action: [ (C {(__helpers_die)} {(DQ ($ Id.VSub_At '$@'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:278) arg_word: {(1)} ) ] spids: [255 268] ) ] ) ] ) ) (C {(shopt)} {(-s)} {(extdebug)}) (command.ShFunction name: __dump_trace body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'funcname=') (DQ )} {(Id.Lit_VarLike 'sourcefile=') (DQ )} {(Id.Lit_VarLike 'lineno=') (DQ )} {(Id.Lit_VarLike 's=') (DQ (yes))} {(n)} {(p)} ) (C {(declare)} {(-i)} {(Id.Lit_VarLike 'strip=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:341) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(1)}) ) } ) (C {(local)} {(Id.Lit_VarLike 'filespacing=') ($ Id.VSub_Number '$2')} {(Id.Lit_VarLike 'linespacing=') ($ Id.VSub_Number '$3')} ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:n) right: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:FUNCNAME span_id:377) prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:p) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_ARGV span_id:399) prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) ) ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:409) cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:n span_id:413) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:422) ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:FUNCNAME span_id:431) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(${ Id.VSub_Name n)}) ) ) ) } {(Id.Lit_Equals '=') (Id.Lit_Equals '=')} {(DQ (__qa_call))} {(Id.Lit_RBracket ']')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:451) ) ] ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_MinusEqual left: (sh_lhs_expr.Name name:p) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_ARGC span_id:461) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(${ Id.VSub_Name n)}) ) ) } ) ) ) (command.DParen child: (arith_expr.UnaryAssign op_id: Id.Node_PostDMinus child: (sh_lhs_expr.Name name:n) ) ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:n span_id:489) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:498) ) ] action: [ (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:n) right: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:FUNCNAME span_id:511) prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:p) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_ARGV span_id:533) prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) ) ) ] spids: [485 500] ) ] ) (C {(eerror)} {(DQ ('Call stack:'))}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:554) cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:n span_id:558) ) right: (arith_expr.ArithWord w:{(${ Id.VSub_Name strip)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:569) ) ] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:funcname) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:FUNCNAME span_id:576) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w:{(${ Id.VSub_Name n)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) } spids: [574] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sourcefile) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:590) command_list: (command.CommandList children: [ (C {(basename)} { (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: BASH_SOURCE span_id: 595 ) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(${ Id.VSub_Name n)}) ) ) ) } ) ] ) ) } spids: [589] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lineno) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_LINENO span_id:608) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w:{(${ Id.VSub_Name n)}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) } spids: [606] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:args) op: assign_op.Equal rhs: (word.Empty) spids: [625] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: { (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: BASH_ARGV span_id: 636 ) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:644) ) ] action: [ (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:j) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) cond: (arith_expr.Binary op_id: Id.Arith_LessEqual left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:j span_id:661) ) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_ARGC span_id:666) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w: {(${ Id.VSub_Name n)} ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) } ) ) update: (arith_expr.UnaryAssign op_id: Id.Arith_DPlus child: (sh_lhs_expr.Name name:j) ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:newarg) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id: Id.VSub_Name val: BASH_ARGV span_id: 692 ) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.VarRef token: (Token id: Id.Lit_ArithVarLike val: p span_id: 696 ) ) right: (arith_expr.VarRef token: (Token id: Id.Lit_ArithVarLike val: j span_id: 700 ) ) ) right: (arith_expr.ArithWord w: {(Id.Lit_Digits 1)} ) ) ) } ) ) ) } spids: [690] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:args) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:args span_id:715) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(${ Id.VSub_Name args) (' ')} ) ) ("'") (${ Id.VSub_Name newarg) ("'") ) } spids: [712] ) ] ) ] ) ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_MinusEqual left: (sh_lhs_expr.Name name:p) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_ARGC span_id:740) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w: {(${ Id.VSub_Name n)} ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) } ) ) ) ] spids: [628 646] ) ] ) (C {(eerror)} { (DQ (' ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:763) command_list: (command.CommandList children: [ (C {(printf)} {(DQ ('%') (${ Id.VSub_Name filespacing) (s))} {(DQ (${ Id.VSub_Name sourcefile))} ) ] ) ) (', line ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:781) command_list: (command.CommandList children: [ (C {(printf)} {(DQ ('%') (${ Id.VSub_Name linespacing) (s))} {(DQ (${ Id.VSub_Name lineno))} ) ] ) ) (': Called ') (${ Id.VSub_Name funcname) (braced_var_sub token: (Token id:Id.VSub_Name val:args span_id:803) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(' ') (${ Id.VSub_Name args)} ) ) ) } ) (command.DParen child: (arith_expr.UnaryAssign op_id: Id.Node_PostDMinus child: (sh_lhs_expr.Name name:n) ) ) ] ) ) ] ) ) (command.ShFunction name: nonfatal body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children:[(C {(___eapi_has_nonfatal)})] negated:T) terminator: (Token id:Id.Op_Semi val:';' span_id:839) ) ] action: [ (C {(die)} {(DQ ($ Id.VSub_DollarName '$FUNCNAME') ('() not supported in this EAPI'))} ) ] spids: [834 841] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_lt left: {($ Id.VSub_Pound '$#')} right: {(1)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:866) ) ] action: [ (C {(die)} {(DQ ($ Id.VSub_DollarName '$FUNCNAME') ('(): Missing argument'))}) ] spids: [855 868] ) ] ) (command.Simple words: [{(DQ ($ Id.VSub_At '$@'))}] more_env: [(env_pair name:PORTAGE_NONFATAL val:{(1)} spids:[883])] ) ] ) ) (command.ShFunction name: __bashpid body: (command.BraceGroup children: [(C {(sh)} {(-c)} {(SQ (Token id:Id.Lit_Chars val:'echo ${PPID}' span_id:917))})] ) ) (command.ShFunction name: __helpers_die body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(___eapi_helpers_can_die)}) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name PORTAGE_NONFATAL)} right: {(1)} ) ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:947) ) ] action: [(C {(die)} {(DQ ($ Id.VSub_At '$@'))})] spids: [930 949] ) ] else_action: [ (command.Simple words: [{(echo)} {(-e)} {(DQ ($ Id.VSub_At '$@'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:970) fd: -1 arg_word: {(2)} ) ] ) ] ) ] ) ) (command.ShFunction name: die body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(${ Id.VSub_Name _PORTAGE_ORIG_PATH)} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PATH) op: assign_op.Equal rhs: {(${ Id.VSub_Name _PORTAGE_ORIG_PATH)} spids: [1006] ) ] ) ] ) (C {(Id.KW_Set set)} {(Id.Lit_Other '+') (x)}) (C {(local)} {(Id.Lit_VarLike 'IFS=') (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:1025) tokens: [ (Token id:Id.Char_Literals val:' ' span_id:1026) (Token id:Id.Char_OneChar val:'\\t' span_id:1027) (Token id:Id.Char_OneChar val:'\\n' span_id:1028) ] ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(___eapi_die_can_respect_nonfatal)}) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_Number '$1')} right: {(Id.BoolUnary_n -n)} ) ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:1048) ) ] action: [ (C {(shift)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name PORTAGE_NONFATAL)} right: {(1)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1069) ) ] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_gt left: {($ Id.VSub_Pound '$#')} right: {(0)} ) ) (C {(eerror)} {(DQ ($ Id.VSub_Star '$*'))}) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1093) arg_word: {(1)} ) ] spids: [1056 1071] ) ] ) ] spids: [1033 1050] ) ] ) (C {(Id.KW_Set set)} {(Id.Lit_Other '+') (e)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-n)} {(DQ (${ Id.VSub_Name QA_INTERCEPTORS))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1125) ) ] action: [ (C {(unset)} {(-f)} {(${ Id.VSub_Name QA_INTERCEPTORS)}) (C {(unset)} {(QA_INTERCEPTORS)}) ] spids: [1111 1127] ) ] ) (C {(local)} {(n)} {(Id.Lit_VarLike 'filespacing=') (0)} {(Id.Lit_VarLike 'linespacing=') (0)} ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:n) right: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:FUNCNAME span_id:1178) prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:1192) cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:n span_id:1196) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1205) ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:FUNCNAME span_id:1214) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(${ Id.VSub_Name n)}) ) ) ) } {(Id.Lit_Equals '=') (Id.Lit_Equals '=')} {(DQ (__qa_call))} {(Id.Lit_RBracket ']')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:1234) ) ] ) (command.DParen child: (arith_expr.UnaryAssign op_id: Id.Node_PostDMinus child: (sh_lhs_expr.Name name:n) ) ) ] ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:n span_id:1251) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:n) right: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:FUNCNAME span_id:1270) prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:1284) cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:n span_id:1288) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1296) ) ] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sourcefile) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_SOURCE span_id:1303) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(${ Id.VSub_Name n)}) ) ) } spids: [1301] ) (assign_pair lhs: (sh_lhs_expr.Name name:sourcefile) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:sourcefile span_id:1313) suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPound arg_word: {('*') (Id.Lit_Slash /)} ) ) } spids: [1311] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lineno) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_LINENO span_id:1322) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(${ Id.VSub_Name n)}) ) ) } spids: [1320] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:filespacing span_id:1332) ) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:sourcefile span_id:1338) prefix_op: (Id.VSub_Pound) ) } ) ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:filespacing) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:sourcefile span_id:1348) prefix_op: (Id.VSub_Pound) ) } spids: [1345] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:linespacing span_id:1353) ) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:lineno span_id:1359) prefix_op: (Id.VSub_Pound) ) } ) ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:linespacing) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:lineno span_id:1369) prefix_op: (Id.VSub_Pound) ) } spids: [1366] ) ] ) ] ) (command.DParen child: (arith_expr.UnaryAssign op_id: Id.Node_PostDMinus child: (sh_lhs_expr.Name name:n) ) ) ] ) ) (C {(local)} {(Id.Lit_VarLike 'phase_str=')}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$EBUILD_PHASE')} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:phase_str) op: assign_op.Equal rhs: {(DQ (' (') ($ Id.VSub_DollarName '$EBUILD_PHASE') (' phase)'))} spids: [1409] ) ] ) ] ) (C {(eerror)} { (DQ ('ERROR: ') (${ Id.VSub_Name CATEGORY) (/) (${ Id.VSub_Name PF) ('::') (${ Id.VSub_Name PORTAGE_REPO_NAME) (' failed') (${ Id.VSub_Name phase_str) (':') ) } ) (C {(eerror)} { (DQ (' ') (braced_var_sub token: (Token id:Id.VSub_Star val:'*' span_id:1445) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {('(no error message)')} ) ) ) } ) (C {(eerror)}) (C {(local)} {(main_index)}) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:main_index) right: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_SOURCE span_id:1472) prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(has)} { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_SOURCE span_id:1491) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$main_index')}) ) suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPound arg_word: {('*') (Id.Lit_Slash /)} ) ) } {(ebuild.sh)} {(misc-functions.sh)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1504) ) ] action: [ (C {(__dump_trace)} {(2)} {(${ Id.VSub_Name filespacing)} {(${ Id.VSub_Name linespacing)} ) (C {(eerror)} { (DQ (' ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1526) command_list: (command.CommandList children: [ (C {(printf)} {(DQ ('%') (${ Id.VSub_Name filespacing) (s))} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_SOURCE span_id:1539) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPound arg_word: {('*') (Id.Lit_Slash /)} ) ) ) } ) ] ) ) (', line ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1550) command_list: (command.CommandList children: [ (C {(printf)} {(DQ ('%') (${ Id.VSub_Name linespacing) (s))} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_LINENO span_id:1563) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) ) } ) ] ) ) (': Called die') ) } ) (C {(eerror)} {(DQ ('The specific snippet of code:'))}) (command.Pipeline children: [ (C {(sed)} {(-n)} {(-e)} { (DQ ('# When we get to the line that failed, append it to the\n') ('\t\t # hold space, move the hold space to the pattern space,\n') ('\t\t # then print out the pattern space and quit immediately\n') ('\t\t ') (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_LINENO span_id:1619) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) ('{H;g;p;q}') ) } {(-e)} { (SQ (Token id: Id.Lit_Chars val: '# If this line ends with a line continuation, append it\n' span_id: 1632 ) (Token id:Id.Lit_Chars val:'\t\t # to the hold space\n' span_id:1633) (Token id: Id.Lit_Chars val: '\t\t /\\\\$/H' span_id: 1634 ) ) } {(-e)} { (SQ (Token id: Id.Lit_Chars val: '# If this line does not end with a line continuation,\n' span_id: 1642 ) (Token id: Id.Lit_Chars val: '\t\t # erase the line and set the hold buffer to it (thus\n' span_id: 1643 ) (Token id:Id.Lit_Chars val:'\t\t # erasing the hold buffer in the process)\n' span_id:1644) (Token id: Id.Lit_Chars val: '\t\t /[^\\]$/{s:^.*$::;h}' span_id: 1645 ) ) } { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_SOURCE span_id:1652) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) ) } ) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:1d span_id:1668))} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s:^:RETAIN-LEADING-SPACE:' span_id:1674))} ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:1681) cond: [ (command.Sentence child: (C {(read)} {(-r)} {(n)}) terminator: (Token id:Id.Op_Semi val:';' span_id:1689) ) ] body: (command.DoGroup children: [ (command.Sentence child: (C {(eerror)} { (DQ (' ') (braced_var_sub token: (Token id:Id.VSub_Name val:n span_id:1698) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Pound arg_word: {(RETAIN-LEADING-SPACE)} ) ) ) } ) terminator: (Token id:Id.Op_Semi val:';' span_id:1704) ) ] ) ) ] negated: F ) (C {(eerror)}) ] spids: [1486 1506] ) ] ) (C {(eerror)} { (DQ ('If you need support, post the output of ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\`' span_id:1719) ) ("emerge --info '=") (${ Id.VSub_Name CATEGORY) (/) (${ Id.VSub_Name PF) ('::') (${ Id.VSub_Name PORTAGE_REPO_NAME) ("'") (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\`' span_id:1733)) (',') ) } ) (C {(eerror)} { (DQ ('the complete build log and the output of ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\`' span_id:1742) ) ("emerge -pqv '=") (${ Id.VSub_Name CATEGORY) (/) (${ Id.VSub_Name PF) ('::') (${ Id.VSub_Name PORTAGE_REPO_NAME) ("'") (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\`' span_id:1756)) (.) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(has)} { (braced_var_sub token: (Token id:Id.VSub_Name val:BASH_SOURCE span_id:1783) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$main_index')} ) ) suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPound arg_word: {('*') (Id.Lit_Slash /)} ) ) } {(ebuild.sh)} {(misc-functions.sh)} ) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name EBUILD_PHASE)} right: {(depend)} ) ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:1812) ) ] action: [ (C {(local)} {(x)}) (command.ForEach iter_name: x iter_words: [{($ Id.VSub_DollarName '$EBUILD_DEATH_HOOKS')}] do_arg_iter: F body: (command.DoGroup children: [ (command.Simple words: [{(${ Id.VSub_Name x)} {(DQ ($ Id.VSub_At '$@'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1842) fd: -1 arg_word: {(2)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:1845) fd: 1 arg_word: {(2)} ) ] ) ] ) ) (command.Simple redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1852) fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$PORTAGE_BUILDDIR') (/.die_hooks))} ) ] ) ] spids: [1778 1814] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(${ Id.VSub_Name PORTAGE_LOG_FILE)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1876) ) ] action: [ (C {(eerror)} { (DQ ("The complete build log is located at '") (${ Id.VSub_Name PORTAGE_LOG_FILE) ("'.") ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name PORTAGE_LOG_FILE)} right: {(${ Id.VSub_Name T) (/) (Id.Lit_Other '*')} ) ) (command.Pipeline children: [ (C {(has)} {(fail-clean)} {(${ Id.VSub_Name FEATURES)}) ] negated: T ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:1924) ) ] action: [ (C {(local)} {(Id.Lit_VarLike 'log_ext=') (log)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name PORTAGE_LOG_FILE)} right: {(Id.Lit_Other '*') (.log)} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:log_ext) op: assign_op.PlusEqual rhs: {(.) (braced_var_sub token: (Token id: Id.VSub_Name val: PORTAGE_LOG_FILE span_id: 1957 ) suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPound arg_word: {('*.')} ) ) } spids: [1954] ) ] ) ] ) (C {(eerror)} { (DQ ("For convenience, a symlink to the build log is located at '") (${ Id.VSub_Name T) (/build.) (${ Id.VSub_Name log_ext) ("'.") ) } ) ] spids: [1892 1926] ) ] ) ] spids: [1864 1878] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-f)} {(DQ (${ Id.VSub_Name T) (/environment))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1999) ) ] action: [ (C {(eerror)} { (DQ ("The ebuild environment file is located at '") (${ Id.VSub_Name T) ("/environment'.") ) } ) ] spids: [1984 2001] ) (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-d)} {(DQ (${ Id.VSub_Name T))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:2029) ) ] action: [ (command.BraceGroup children: [(C {(Id.KW_Set set)}) (C {(export)})] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2045) fd: -1 arg_word: {(DQ (${ Id.VSub_Name T) (/die.env))} ) ] ) (C {(eerror)} { (DQ ("The ebuild environment file is located at '") (${ Id.VSub_Name T) ("/die.env'.") ) } ) ] spids: [2015 2031] ) ] ) (C {(eerror)} { (DQ ("Working directory: '") (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2073) command_list: (command.CommandList children:[(C {(pwd)})]) ) ("'") ) } ) (C {(eerror)} {(DQ ("S: '") (${ Id.VSub_Name S) ("'"))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$PORTAGE_EBUILD_EXIT_FILE')} ) ) (command.Simple redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2102) fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$PORTAGE_EBUILD_EXIT_FILE'))} ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$PORTAGE_IPC_DAEMON')} ) ) (C {(DQ ($ Id.VSub_DollarName '$PORTAGE_BIN_PATH')) (/ebuild-ipc)} {(Id.ControlFlow_Exit exit)} {(1)} ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (braced_var_sub token: (Token id:Id.VSub_Name val:BASHPID span_id:2137) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2139 ) command_list: (command.CommandList children: [(C {(__bashpid)})] ) ) } ) ) } right: {(${ Id.VSub_Name EBUILD_MASTER_PID)} ) ) (C {(kill)} {(-s)} {(SIGTERM)} {(${ Id.VSub_Name EBUILD_MASTER_PID)}) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:2165) arg_word: {(1)} ) ] ) ) (command.ShFunction name: __quiet_mode body: (command.BraceGroup children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {(${ Id.VSub_Name PORTAGE_QUIET)} right: {(1)} ) ) ] ) ) (command.ShFunction name: __vecho body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [(C {(__quiet_mode)}) (C {(echo)} {(DQ ($ Id.VSub_At '$@'))})] ) ] ) ) (command.ShFunction name: __elog_base body: (command.BraceGroup children: [ (C {(local)} {(messagetype)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ (${ Id.VSub_Number 1))} {(-o)} {(-z)} {(DQ (${ Id.VSub_Name T))} {(-o)} {(Id.KW_Bang '!')} {(-d)} {(DQ (${ Id.VSub_Name T) (/logging))} {(Id.Lit_RBracket ']')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2266) arg_word: {(1)} ) ] ) (command.Case to_match: {(DQ (${ Id.VSub_Number 1))} arms: [ (case_arm pat_list: [{(INFO)} {(WARN)} {(ERROR)} {(LOG)} {(QA)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:messagetype) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [2294] ) ] ) (C {(shift)}) ] spids: [2282 2291 2305 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(__vecho)} {(-e)} { (DQ (' ') (${ Id.VSub_Name BAD) ('*') (${ Id.VSub_Name NORMAL) ( ' Invalid use of internal function __elog_base(), next message will not be logged' ) ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2329) arg_word: {(1)} ) ] spids: [2308 2309 2334 -1] ) ] ) (command.Pipeline children: [ (C {(echo)} {(-e)} {(DQ ($ Id.VSub_At '$@'))}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2350) cond: [ (command.Sentence child: (C {(read)} {(-r)}) terminator: (Token id:Id.Op_Semi val:';' span_id:2356) ) ] body: (command.DoGroup children: [ (command.Simple words: [ {(echo)} { (DQ ($ Id.VSub_DollarName '$messagetype') (' ') ($ Id.VSub_DollarName '$REPLY') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:2369) fd: -1 arg_word: { (DQ (${ Id.VSub_Name T) (/logging/) (braced_var_sub token: (Token id:Id.VSub_Name val:EBUILD_PHASE span_id:2379) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(other)} ) ) ) } ) ] ) ] ) ) ] negated: F ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2389) arg_word: {(0)} ) ] ) ) (command.ShFunction name: eqawarn body: (command.BraceGroup children: [ (C {(__elog_base)} {(QA)} {(DQ ($ Id.VSub_Star '$*'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name RC_ENDCOL)} right: {(DQ (yes))} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name LAST_E_CMD)} right: {(DQ (ebegin))} ) ) ) (C {(echo)}) ] ) (command.Pipeline children: [ (C {(echo)} {(-e)} {(DQ ($ Id.VSub_At '$@'))}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2453) cond: [ (command.Sentence child: (C {(read)} {(-r)}) terminator: (Token id:Id.Op_Semi val:';' span_id:2459) ) ] body: (command.DoGroup children: [ (command.Simple words: [ {(__vecho)} { (DQ (' ') ($ Id.VSub_DollarName '$WARN') ('*') ($ Id.VSub_DollarName '$NORMAL') (' ') ($ Id.VSub_DollarName '$REPLY') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:2475) fd: -1 arg_word: {(2)} ) ] ) ] ) ) ] negated: F ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_CMD) op: assign_op.Equal rhs: {(DQ (eqawarn))} spids: [2482] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2488) arg_word: {(0)} ) ] ) ) (command.ShFunction name: elog body: (command.BraceGroup children: [ (C {(__elog_base)} {(LOG)} {(DQ ($ Id.VSub_Star '$*'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name RC_ENDCOL)} right: {(DQ (yes))} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name LAST_E_CMD)} right: {(DQ (ebegin))} ) ) ) (C {(echo)}) ] ) (command.Pipeline children: [ (C {(echo)} {(-e)} {(DQ ($ Id.VSub_At '$@'))}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2552) cond: [ (command.Sentence child: (C {(read)} {(-r)}) terminator: (Token id:Id.Op_Semi val:';' span_id:2558) ) ] body: (command.DoGroup children: [ (C {(echo)} { (DQ (' ') ($ Id.VSub_DollarName '$GOOD') ('*') ($ Id.VSub_DollarName '$NORMAL') (' ') ($ Id.VSub_DollarName '$REPLY') ) } ) ] ) ) ] negated: F ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_CMD) op: assign_op.Equal rhs: {(DQ (elog))} spids: [2578] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2584) arg_word: {(0)} ) ] ) ) (command.ShFunction name: einfo body: (command.BraceGroup children: [ (C {(__elog_base)} {(INFO)} {(DQ ($ Id.VSub_Star '$*'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name RC_ENDCOL)} right: {(DQ (yes))} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name LAST_E_CMD)} right: {(DQ (ebegin))} ) ) ) (C {(echo)}) ] ) (command.Pipeline children: [ (C {(echo)} {(-e)} {(DQ ($ Id.VSub_At '$@'))}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2648) cond: [ (command.Sentence child: (C {(read)} {(-r)}) terminator: (Token id:Id.Op_Semi val:';' span_id:2654) ) ] body: (command.DoGroup children: [ (C {(echo)} { (DQ (' ') ($ Id.VSub_DollarName '$GOOD') ('*') ($ Id.VSub_DollarName '$NORMAL') (' ') ($ Id.VSub_DollarName '$REPLY') ) } ) ] ) ) ] negated: F ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_CMD) op: assign_op.Equal rhs: {(DQ (einfo))} spids: [2674] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2680) arg_word: {(0)} ) ] ) ) (command.ShFunction name: einfon body: (command.BraceGroup children: [ (C {(__elog_base)} {(INFO)} {(DQ ($ Id.VSub_Star '$*'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name RC_ENDCOL)} right: {(DQ (yes))} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name LAST_E_CMD)} right: {(DQ (ebegin))} ) ) ) (C {(echo)}) ] ) (C {(echo)} {(-ne)} { (DQ (' ') (${ Id.VSub_Name GOOD) ('*') (${ Id.VSub_Name NORMAL) (' ') ($ Id.VSub_Star '$*') ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_CMD) op: assign_op.Equal rhs: {(DQ (einfon))} spids: [2752] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2758) arg_word: {(0)} ) ] ) ) (command.ShFunction name: ewarn body: (command.BraceGroup children: [ (C {(__elog_base)} {(WARN)} {(DQ ($ Id.VSub_Star '$*'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name RC_ENDCOL)} right: {(DQ (yes))} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name LAST_E_CMD)} right: {(DQ (ebegin))} ) ) ) (C {(echo)}) ] ) (command.Pipeline children: [ (C {(echo)} {(-e)} {(DQ ($ Id.VSub_At '$@'))}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2822) cond: [ (command.Sentence child: (C {(read)} {(-r)}) terminator: (Token id:Id.Op_Semi val:';' span_id:2828) ) ] body: (command.DoGroup children: [ (command.Simple words: [ {(echo)} { (DQ (' ') ($ Id.VSub_DollarName '$WARN') ('*') ($ Id.VSub_DollarName '$NORMAL') (' ') ($ Id.VSub_DollarName '$RC_INDENTATION') ($ Id.VSub_DollarName '$REPLY') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:2845) fd: -1 arg_word: {(2)} ) ] ) ] ) ) ] negated: F ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_CMD) op: assign_op.Equal rhs: {(DQ (ewarn))} spids: [2852] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2858) arg_word: {(0)} ) ] ) ) (command.ShFunction name: eerror body: (command.BraceGroup children: [ (C {(__elog_base)} {(ERROR)} {(DQ ($ Id.VSub_Star '$*'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(${ Id.VSub_Name RC_ENDCOL)} right: {(DQ (yes))} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name LAST_E_CMD)} right: {(DQ (ebegin))} ) ) ) (C {(echo)}) ] ) (command.Pipeline children: [ (C {(echo)} {(-e)} {(DQ ($ Id.VSub_At '$@'))}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2922) cond: [ (command.Sentence child: (C {(read)} {(-r)}) terminator: (Token id:Id.Op_Semi val:';' span_id:2928) ) ] body: (command.DoGroup children: [ (command.Simple words: [ {(echo)} { (DQ (' ') ($ Id.VSub_DollarName '$BAD') ('*') ($ Id.VSub_DollarName '$NORMAL') (' ') ($ Id.VSub_DollarName '$RC_INDENTATION') ($ Id.VSub_DollarName '$REPLY') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:2945) fd: -1 arg_word: {(2)} ) ] ) ] ) ) ] negated: F ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_CMD) op: assign_op.Equal rhs: {(DQ (eerror))} spids: [2952] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2958) arg_word: {(0)} ) ] ) ) (command.ShFunction name: ebegin body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'msg=') (DQ ($ Id.VSub_Star '$*'))} {(dots)} {(Id.Lit_VarLike 'spaces=') (braced_var_sub token: (Token id:Id.VSub_Name val:RC_DOT_PATTERN span_id:2983) suffix_op: (suffix_op.PatSub pat:{('?')} replace:{(' ')} replace_mode:Id.Lit_Slash) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(${ Id.VSub_Name RC_DOT_PATTERN)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:3004) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dots) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3010) command_list: (command.CommandList children: [ (C {(printf)} { (DQ ('%') (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.VarRef token: (Token id: Id.Lit_ArithVarLike val: COLS span_id: 3017 ) ) right: (arith_expr.ArithWord w: {(Id.Lit_Digits 3)} ) ) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id: Id.VSub_Name val: RC_INDENTATION span_id: 3027 ) prefix_op: (Id.VSub_Pound) ) } ) ) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id: Id.VSub_Name val: msg span_id: 3034 ) prefix_op: (Id.VSub_Pound) ) } ) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 7)}) ) ) (s) ) } {(SQ )} ) ] ) ) } spids: [3009] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dots) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:dots span_id:3053) suffix_op: (suffix_op.PatSub pat: {(${ Id.VSub_Name spaces)} replace: {(${ Id.VSub_Name RC_DOT_PATTERN)} replace_mode: Id.Lit_Slash ) ) } spids: [3051] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msg) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name msg) (${ Id.VSub_Name dots))} spids: [3066] ) ] ) ] spids: [2992 3006] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msg) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name msg) (' ...'))} spids: [3080] ) ] ) ] ) (C {(einfon)} {(DQ (${ Id.VSub_Name msg))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name RC_ENDCOL)} right: {(DQ (yes))} ) ) (C {(echo)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_LEN) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w:{(Id.Lit_Digits 3)}) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id: Id.VSub_Name val: RC_INDENTATION span_id: 3129 ) prefix_op: (Id.VSub_Pound) ) } ) ) right: (arith_expr.ArithWord w: { (braced_var_sub token: (Token id:Id.VSub_Name val:msg span_id:3136) prefix_op: (Id.VSub_Pound) ) } ) ) ) } spids: [3120] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_CMD) op: assign_op.Equal rhs: {(DQ (ebegin))} spids: [3143] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:3149) arg_word: {(0)} ) ] ) ) (command.ShFunction name: __eend body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'retval=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:3167) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(0)}) ) } {(Id.Lit_VarLike 'efunc=') (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:3174) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(eerror)}) ) } {(msg)} ) (C {(shift)} {(2)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name retval)} right: {(DQ (0))} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:3204) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msg) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name BRACKET) ('[ ') (${ Id.VSub_Name GOOD) (ok) (${ Id.VSub_Name BRACKET) (' ]') (${ Id.VSub_Name NORMAL) ) } spids: [3209] ) ] ) ] spids: [3188 3206] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_Star '$*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:3242) ) ] action: [(C {(${ Id.VSub_Name efunc)} {(DQ ($ Id.VSub_Star '$*'))})] spids: [3232 3244] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:msg) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name BRACKET) ('[ ') (${ Id.VSub_Name BAD) ('!!') (${ Id.VSub_Name BRACKET) (' ]') (${ Id.VSub_Name NORMAL) ) } spids: [3259] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name RC_ENDCOL)} right: {(DQ (yes))} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:3299) ) ] action: [ (C {(echo)} {(-e)} {(DQ (${ Id.VSub_Name ENDCOL) (' ') (${ Id.VSub_Name msg))}) ] spids: [3283 3301] ) ] else_action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name LAST_E_CMD)} right: {(ebegin)} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_LEN) op: assign_op.Equal rhs: {(0)} spids: [3336] ) ] ) ] ) (C {(printf)} { (DQ ('%') (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:COLS span_id:3346) ) right: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:LAST_E_LEN span_id:3350) ) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 7)}) ) ) ('s%b') (Id.Lit_Other '\\') (n) ) } {(SQ )} {(DQ (${ Id.VSub_Name msg))} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:3377) arg_word: {(${ Id.VSub_Name retval)} ) ] ) ) (command.ShFunction name: eend body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'retval=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:3397) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(0)}) ) } ) (C {(shift)}) (C {(__eend)} {(${ Id.VSub_Name retval)} {(eerror)} {(DQ ($ Id.VSub_Star '$*'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LAST_E_CMD) op: assign_op.Equal rhs: {(DQ (eend))} spids: [3421] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:3427) arg_word: {(${ Id.VSub_Name retval)} ) ] ) ) (command.ShFunction name: __unset_colors body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COLS) op: assign_op.Equal rhs: {(80)} spids: [3443] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ENDCOL) op: assign_op.Equal rhs: (word.Empty) spids: [3447] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GOOD) op: assign_op.Equal rhs: (word.Empty) spids: [3451] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WARN) op: assign_op.Equal rhs: (word.Empty) spids: [3454] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BAD) op: assign_op.Equal rhs: (word.Empty) spids: [3457] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NORMAL) op: assign_op.Equal rhs: (word.Empty) spids: [3460] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HILITE) op: assign_op.Equal rhs: (word.Empty) spids: [3463] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BRACKET) op: assign_op.Equal rhs: (word.Empty) spids: [3466] ) ] ) ] ) ) (command.ShFunction name: __set_colors body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COLS) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:COLUMNS span_id:3480) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(0)}) ) } spids: [3478] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$COLS')} right: {(0)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {($ Id.VSub_DollarName '$EBUILD_PHASE')} right: {(depend)} ) ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COLS) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3532) command_list: (command.CommandList children: [ (command.Sentence child: (C {(Id.KW_Set set)} {(--)} { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3537 ) command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [{(stty)} {(size)}] redirects: [ (redir.Redir op: (Token id: Id.Redir_Less val: '<' span_id: 3545 ) fd: -1 arg_word: {(/dev/tty)} ) ] ) ] ) redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '2>' span_id: 3550 ) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(echo)} {(24)} {(80)}) ] ) ] ) ) } ) terminator: (Token id:Id.Op_Semi val:';' span_id:3563) ) (C {(echo)} {($ Id.VSub_Number '$2')}) ] ) ) } spids: [3531] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:COLS span_id:3573) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:COLS) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 80)}) ) ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ENDCOL) op: assign_op.Equal rhs: { (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:3606) tokens: [ (Token id:Id.Char_OneChar val:'\\e' span_id:3607) (Token id:Id.Char_Literals val:'[A' span_id:3608) (Token id:Id.Char_OneChar val:'\\e' span_id:3609) (Token id:Id.Char_Literals val:'[' span_id:3610) ] ) (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:COLS span_id:3614) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 8)}) ) ) (SQ (Token id:Id.Lit_Chars val:C span_id:3623)) } spids: [3605] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-n)} {(DQ (${ Id.VSub_Name PORTAGE_COLORMAP))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:3641) ) ] action: [(C {(eval)} {(${ Id.VSub_Name PORTAGE_COLORMAP)})] spids: [3627 3643] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GOOD) op: assign_op.Equal rhs: { (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:3657) tokens: [ (Token id: Id.Char_OneChar val: '\\e' span_id: 3658 ) (Token id: Id.Char_Literals val: '[32;01m' span_id: 3659 ) ] ) } spids: [3656] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WARN) op: assign_op.Equal rhs: { (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:3664) tokens: [ (Token id: Id.Char_OneChar val: '\\e' span_id: 3665 ) (Token id: Id.Char_Literals val: '[33;01m' span_id: 3666 ) ] ) } spids: [3663] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BAD) op: assign_op.Equal rhs: { (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:3671) tokens: [ (Token id: Id.Char_OneChar val: '\\e' span_id: 3672 ) (Token id: Id.Char_Literals val: '[31;01m' span_id: 3673 ) ] ) } spids: [3670] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HILITE) op: assign_op.Equal rhs: { (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:3678) tokens: [ (Token id: Id.Char_OneChar val: '\\e' span_id: 3679 ) (Token id: Id.Char_Literals val: '[36;01m' span_id: 3680 ) ] ) } spids: [3677] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BRACKET) op: assign_op.Equal rhs: { (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:3685) tokens: [ (Token id: Id.Char_OneChar val: '\\e' span_id: 3686 ) (Token id: Id.Char_Literals val: '[34;01m' span_id: 3687 ) ] ) } spids: [3684] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NORMAL) op: assign_op.Equal rhs: { (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:3692) tokens: [ (Token id: Id.Char_OneChar val: '\\e' span_id: 3693 ) (Token id: Id.Char_Literals val: '[0m' span_id: 3694 ) ] ) } spids: [3691] ) ] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RC_ENDCOL) op: assign_op.Equal rhs: {(DQ (yes))} spids: [3703] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RC_INDENTATION) op: assign_op.Equal rhs: {(SQ )} spids: [3708] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RC_DEFAULT_INDENT) op: assign_op.Equal rhs: {(2)} spids: [3712] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RC_DOT_PATTERN) op: assign_op.Equal rhs: {(SQ )} spids: [3715] ) ] ) (command.Case to_match: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:NOCOLOR span_id:3724) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(false)}) ) ) } arms: [ (case_arm pat_list: [{(yes)} {(true)}] action: [(C {(__unset_colors)})] spids: [3733 3736 3742 -1] ) (case_arm pat_list: [{(no)} {(false)}] action: [(C {(__set_colors)})] spids: [3745 3748 3754 -1] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(${ Id.VSub_Name USERLAND)}) ) terminator: (Token id:Id.Op_Semi val:';' span_id:3771) ) ] action: [ (command.Case to_match: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3778) command_list: (command.CommandList children:[(C {(uname)} {(-s)})]) ) } arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (BSD)} {(DragonFly)}] action: [(C {(export)} {(Id.Lit_VarLike 'USERLAND=') (DQ (BSD))})] spids: [3787 3791 3802 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [(C {(export)} {(Id.Lit_VarLike 'USERLAND=') (DQ (GNU))})] spids: [3805 3806 3817 -1] ) ] ) ] spids: [3759 3773] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(${ Id.VSub_Name XARGS)}) ) terminator: (Token id:Id.Op_Semi val:';' span_id:3837) ) ] action: [ (command.Case to_match: {(${ Id.VSub_Name USERLAND)} arms: [ (case_arm pat_list: [{(BSD)}] action: [(C {(export)} {(Id.Lit_VarLike 'XARGS=') (DQ (xargs))})] spids: [3851 3852 3863 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [(C {(export)} {(Id.Lit_VarLike 'XARGS=') (DQ ('xargs -r'))})] spids: [3866 3867 3878 -1] ) ] ) ] spids: [3825 3839] ) ] ) (command.ShFunction name: hasq body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(has)} {($ Id.VSub_DollarName '$EBUILD_PHASE')} {(prerm)} {(postrm)}) (C {(eqawarn)} {(DQ ("QA Notice: The 'hasq' function is deprecated (replaced by 'has')"))} ) ] ) (C {(has)} {(DQ ($ Id.VSub_At '$@'))}) ] ) ) (command.ShFunction name: hasv body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(has)} {(DQ ($ Id.VSub_At '$@'))}) terminator: (Token id:Id.Op_Semi val:';' span_id:3936) ) ] action: [ (C {(echo)} {(DQ ($ Id.VSub_Number '$1'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:3948) arg_word: {(0)} ) ] spids: [3928 3938] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:3956) arg_word: {(1)} ) ] ) ) (command.ShFunction name: has body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'needle=') ($ Id.VSub_Number '$1')}) (C {(shift)}) (C {(local)} {(x)}) (command.ForEach iter_name: x iter_words: [{(DQ ($ Id.VSub_At '$@'))}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ (${ Id.VSub_Name x))} {(Id.Lit_Equals '=')} {(DQ (${ Id.VSub_Name needle))} {(Id.Lit_RBracket ']')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:4019) arg_word: {(0)} ) ] ) ] ) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:4027) arg_word: {(1)} ) ] ) ) (command.ShFunction name: __repo_attr body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'appropriate_section=') (0)} {(Id.Lit_VarLike 'exit_status=') (1)} {(line)} {(Id.Lit_VarLike 'saved_extglob_shopt=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4052) command_list: (command.CommandList children:[(C {(shopt)} {(-p)} {(extglob)})]) ) } ) (C {(shopt)} {(-s)} {(extglob)}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:4068) cond: [ (command.Sentence child: (C {(read)} {(line)}) terminator: (Token id:Id.Op_Semi val:';' span_id:4073) ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name appropriate_section)} right: {(0)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name line)} right: {(DQ ('[') ($ Id.VSub_Number '$1') (']'))} ) ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:appropriate_section) op: assign_op.Equal rhs: {(1)} spids: [4106] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Continue val:continue span_id:4111) ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name appropriate_section)} right: {(1)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name line)} right: {(DQ ('[')) (Id.Lit_Other '*') (DQ (']'))} ) ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:appropriate_section) op: assign_op.Equal rhs: {(0)} spids: [4144] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Continue val:continue span_id:4149) ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name appropriate_section)} right: {(1)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {(${ Id.VSub_Name line)} right: {(Id.Lit_Other '^') (${ Id.VSub_Number 2) (Id.Lit_Other '[') (Id.Lit_Other '[') (Id.Lit_Other ':') (space) (Id.Lit_Other ':') (Id.Lit_Other ']') (Id.Lit_Other ']') (Id.Lit_Other '*') (Id.Lit_Other '=') } ) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4203) ) ] action: [ (C {(echo)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:line span_id:4212) suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPound arg_word: {($ Id.VSub_Number '$2') ('*( )=*( )')} ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:exit_status) op: assign_op.Equal rhs: {(0)} spids: [4220] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:4224) ) ] spids: [4168 4205] ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_TLess val:'<<<' span_id:4232) fd: -1 arg_word: {(DQ (${ Id.VSub_Name PORTAGE_REPOSITORIES))} ) ] ) (C {(eval)} {(DQ (${ Id.VSub_Name saved_extglob_shopt))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:4250) arg_word: {(${ Id.VSub_Name exit_status)} ) ] ) ) (command.ShFunction name: __eqaquote body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'v=') (${ Id.VSub_Number 1)} {(Id.Lit_VarLike 'esc=') (SQ )}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:v) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:v span_id:4294) suffix_op: (suffix_op.PatSub pat: { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\\\' span_id:4297) ) } replace: { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\\\' span_id:4299) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\\\' span_id:4300)) } replace_mode: Id.Lit_Slash ) ) } spids: [4292] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:v) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:v span_id:4310) suffix_op: (suffix_op.PatSub pat: { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:4313) ) } replace: { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\\\' span_id:4315) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:4316)) } replace_mode: Id.Lit_Slash ) ) } spids: [4308] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:4324) cond: [ (command.Sentence child: (C {(read)} {(-r)}) terminator: (Token id:Id.Op_Semi val:';' span_id:4329) ) ] body: (command.DoGroup children: [ (C {(echo)} {(-n)} {(DQ (${ Id.VSub_Name esc) (${ Id.VSub_Name REPLY))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:esc) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'\\n' span_id:4350))} spids: [4348] ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_TLess val:'<<<' span_id:4356) fd: -1 arg_word: {(DQ (${ Id.VSub_Name v))} ) ] ) ] ) ) (command.ShFunction name: __eqatag body: (command.BraceGroup children: [ (C {(local)} {(tag)} {(i)} {(Id.Lit_VarLike 'filenames=') (sh_array_literal left:(Token id:Id.Op_LParen val:'(' span_id:4410)) } {(Id.Lit_VarLike 'data=') (sh_array_literal left:(Token id:Id.Op_LParen val:'(' span_id:4414))} {(Id.Lit_VarLike 'verbose=')} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Number 1)} right: {(Id.BoolUnary_v -v)} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4434) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:verbose) op: assign_op.Equal rhs: {(1)} spids: [4439] ) ] ) (C {(shift)}) ] spids: [4421 4436] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tag) op: assign_op.Equal rhs: {(${ Id.VSub_Number 1)} spids: [4450] ) ] ) (C {(shift)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_n child:{(${ Id.VSub_Name tag)}) ) (C {(die)} {(DQ (${ Id.VSub_Name FUNCNAME) (': no tag specified'))}) ] ) (command.ForEach iter_name: i do_arg_iter: T body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name i)} right: {(/) (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4508) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:filenames) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4514) words: [{(DQ (${ Id.VSub_Name i))}] ) } spids: [4513] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {(${ Id.VSub_Name verbose)} ) ) (C {(eqawarn)} {(DQ (' ') (${ Id.VSub_Name i))}) ] ) ] spids: [4494 4510] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name i)} right: {(Id.Lit_Other '*') (Id.BoolBinary_GlobEqual '=') (Id.Lit_Other '*') } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4562) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:data) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:4568) words: [{(DQ (${ Id.VSub_Name i))}] ) } spids: [4567] ) ] ) ] spids: [4547 4564] ) ] else_action: [ (C {(die)} { (DQ (${ Id.VSub_Name FUNCNAME) (': invalid parameter: ') (${ Id.VSub_Name i) ) } ) ] ) ] ) ) (command.Subshell command_list: (command.CommandList children: [ (C {(echo)} {(DQ ('- tag: ') (${ Id.VSub_Name tag))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.WordTest w: { (braced_var_sub token: (Token id:Id.VSub_Name val:data span_id:4620) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4627) ) ] action: [ (C {(echo)} {(DQ (' data:'))}) (command.ForEach iter_name: i iter_words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:data span_id:4647) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (C {(echo)} { (DQ (' ') (braced_var_sub token: (Token id:Id.VSub_Name val:i span_id:4663) suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPercent arg_word: {('=*')} ) ) (': ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:4668)) (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4669 ) command_list: (command.CommandList children: [ (C {(__eqaquote)} { (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: i span_id: 4674 ) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Pound arg_word: {('*=')} ) ) ) } ) ] ) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:4680)) ) } ) ] ) ) ] spids: [4615 4629] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.WordTest w: { (braced_var_sub token: (Token id:Id.VSub_Name val:filenames span_id:4695) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:4702) ) ] action: [ (C {(echo)} {(DQ (' files:'))}) (command.ForEach iter_name: i iter_words: [ { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:filenames span_id:4722) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (C {(echo)} { (DQ (' - ') (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\"' span_id: 4737 ) ) (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4738 ) command_list: (command.CommandList children: [(C {(__eqaquote)} {(DQ (${ Id.VSub_Name i))})] ) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:4747)) ) } ) ] ) ) ] spids: [4690 4704] ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:4759) fd: -1 arg_word: {(DQ (${ Id.VSub_Name T)) (/qa.log)} ) ] ) ] ) ) (C {(true)}) ] )