(CommandList children: [ (C {(set)} {(-e)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:url) op:Equal rhs:{($ VSub_Number '$1')} spids:[21])] spids: [21] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:toinstall) op: Equal rhs: {($ VSub_Number '$2')} spids: [24] ) ] spids: [24] ) (ForEach iter_name: i iter_words: [{(curl)} {(xmllint)} {(gunzip)} {(sort)} {(sha256sum)} {(7z)}] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} { (DQ (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(which)} {($ VSub_Name '$i')}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [62] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [57 64] ) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('error: this script requires having ') ($ VSub_Name '$i') (' installed')) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[81])] ) (C {(exit)} {(1)}) ] spids: [-1 70] ) ] spids: [-1 90] ) ] spids: [47 92] ) spids: [33 45] ) (FuncDef name: retry_curl body: (BraceGroup children: [ (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children:[(C {(seq)} {(10)})]) left_token: <Left_CommandSub '$('> spids: [111 115] ) } ] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [ (C {(curl)} {(-fLsS)} {($ VSub_Number '$1')}) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DAmp ) ] spids: [118 136] ) spids: [110 116] ) (SimpleCommand words: [{(echo)} {(DQ ('error: failed to download ') ($ VSub_Number '$1'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[146])] ) (C {(exit)} {(1)}) ] spids: [102] ) spids: [98 101] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:xp) op:Equal rhs:{(DQ ('xmllint --xpath'))} spids:[157])] spids: [157] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:loc) op:Equal rhs:{(DQ ('local-name()='))} spids:[165])] spids: [165] ) (C {(eval)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(retry_curl)} {($ VSub_Name '$url') (/repodata/repomd.xml)}) (C {($ VSub_Name '$xp')} { (DQ ('/*[') ($ VSub_Name '$loc') ("'repomd'] ") (' /*[') ($ VSub_Name '$loc') ("'data'][@type='primary']/*[") ($ VSub_Name '$loc') ("'location']/@href") ) } {(-)} ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [172 195] ) } ) (Case to_match: {($ VSub_Name '$href')} arms: [ (case_arm pat_list: [{(Lit_Other '*') (.gz)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:primary) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(retry_curl)} {($ VSub_Name '$url') (/) ($ VSub_Name '$href')}) (C {(gunzip)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [211 221] ) } spids: [210] ) ] spids: [210] ) ] spids: [205 207 222 -1] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:primary) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(retry_curl)} {($ VSub_Name '$url') (/) ($ VSub_Name '$href')}) ] ) left_token: <Left_CommandSub '$('> spids: [230 236] ) } spids: [229] ) ] spids: [229] ) ] spids: [225 226 237 -1] ) ] spids: [198 202 239] ) (FuncDef name: rpm_select body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:candidates) op: Equal rhs: { (DQ ('<c>') (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$primary')}) (SimpleCommand words: [ {($ VSub_Name '$xp')} { (DQ ('//*[') ($ VSub_Name '$loc') ("'package'] ") (' [./*[') ($ VSub_Name '$loc') ("'name' and .='") ($ VSub_Number '$1') ("']][./*[") ($ VSub_Name '$loc') ("'arch' and .='noarch']]") ) } {(-)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [285] ) ] ) (C {(sed)} {(-e)} {(SQ <'s|<rpm:|<|g'>)} {(-e)} {(SQ <'s|</rpm:|</|g'>)} ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [258 303] ) ('</c>') ) } spids: [255] ) ] spids: [255] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$candidates'))} {(Lit_Other '=')} {(DQ ('<c></c>'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} {(DQ ('error: no package candidates found for ') ($ VSub_Number '$1'))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[339])] ) (C {(exit)} {(1)}) ] spids: [-1 329] ) ] spids: [-1 348] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:epochs) op:Equal rhs:{(DQ )} spids:[351])] spids: [351] ) (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$candidates')}) (C {($ VSub_Name '$xp')} {(DQ ('/c/package/version/@epoch'))} {(-)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [362 376] ) } ] do_arg_iter: False body: (DoGroup children: [ (C {(eval)} {($ VSub_Name '$i')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:epochs) op: Equal rhs: {(DQ ($ VSub_Name '$epochs') (' ') ($ VSub_Name '$epoch'))} spids: [387] ) ] spids: [387] ) ] spids: [379 395] ) spids: [361 377] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:maxepoch) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$epochs')}) (C {(sed)} {(SQ <'s/ /\\n/g'>)}) (C {(sort)} {(-V)} {(-u)}) (C {(tail)} {(-n)} {(1)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [399 427] ) } spids: [398] ) ] spids: [398] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:vers) op:Equal rhs:{(DQ )} spids:[430])] spids: [430] ) (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$candidates')}) (C {($ VSub_Name '$xp')} { (DQ ('/c/package/version ') (" [@epoch='") ($ VSub_Name '$maxepoch') ("']/@ver") ) } {(-)} ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [441 459] ) } ] do_arg_iter: False body: (DoGroup children: [ (C {(eval)} {($ VSub_Name '$i')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:vers) op: Equal rhs: {(DQ ($ VSub_Name '$vers') (' ') ($ VSub_Name '$ver'))} spids: [470] ) ] spids: [470] ) ] spids: [462 478] ) spids: [440 460] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:maxver) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$vers')}) (C {(sed)} {(SQ <'s/ /\\n/g'>)}) (C {(sort)} {(-V)} {(-u)}) (C {(tail)} {(-n)} {(1)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [482 510] ) } spids: [481] ) ] spids: [481] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:rels) op:Equal rhs:{(DQ )} spids:[513])] spids: [513] ) (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$candidates')}) (C {($ VSub_Name '$xp')} { (DQ ('/c/package/version ') (" [@epoch='") ($ VSub_Name '$maxepoch') ("'][@ver='") ($ VSub_Name '$maxver') ("']/@rel") ) } {(-)} ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [524 544] ) } ] do_arg_iter: False body: (DoGroup children: [ (C {(eval)} {($ VSub_Name '$i')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:rels) op: Equal rhs: {(DQ ($ VSub_Name '$rels') (' ') ($ VSub_Name '$rel'))} spids: [555] ) ] spids: [555] ) ] spids: [547 563] ) spids: [523 545] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:maxrel) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$rels')}) (C {(sed)} {(SQ <'s/ /\\n/g'>)}) (C {(sort)} {(-V)} {(-u)}) (C {(tail)} {(-n)} {(1)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [567 595] ) } spids: [566] ) ] spids: [566] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:repeats) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$rels')}) (C {(sed)} {(SQ <'s/ /\\n/g'>)}) (C {(sort)} {(-V)}) (C {(uniq)} {(-d)}) (C {(tail)} {(-n)} {(1)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [599 631] ) } spids: [598] ) ] spids: [598] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$repeats'))} {(Lit_Other '=')} {(DQ ($ VSub_Name '$maxrel'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('warning: multiple candidates found for ') ($ VSub_Number '$1') (' with same version:') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[662])] ) (SimpleCommand words: [ {(echo)} { (DQ ('epoch ') ($ VSub_Name '$maxepoch') (', ver ') ($ VSub_Name '$maxver') (', rel ') ($ VSub_Name '$maxrel') (', picking at random') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[678])] ) ] spids: [-1 651] ) ] spids: [-1 682] ) (Pipeline children: [ (C {(echo)} {($ VSub_Name '$candidates')}) (C {($ VSub_Name '$xp')} { (DQ ("/c/package[version[@epoch='") ($ VSub_Name '$maxepoch') ("'] ") (" [@ver='") ($ VSub_Name '$maxver') ("'][@rel='") ($ VSub_Name '$maxrel') ("']][1]") ) } {(-)} ) ] negated: False ) ] spids: [252] ) spids: [248 251] ) (ForEach iter_name: i iter_words: [{($ VSub_Name '$toinstall')}] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(rpm_select)} {($ VSub_Name '$i')})] ) left_token: <Left_CommandSub '$('> spids: [733 737] ) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(exit)} {(1)})] spids: [-1 743] ) ] spids: [-1 751] ) ] spids: [719 753] ) spids: [715 717] ) (FuncDef name: rpm_requires body: (BraceGroup children: [ (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(rpm_select)} {($ VSub_Number '$1')}) (SimpleCommand words: [ {($ VSub_Name '$xp')} {(DQ ('/package/format/requires/entry/@name'))} {(-)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [789] ) ] ) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [772 791] ) } ] do_arg_iter: False body: (DoGroup children: [(C {(eval)} {($ VSub_Name '$i')}) (C {(echo)} {($ VSub_Name '$name')})] spids: [794 807] ) spids: [771 792] ) ] spids: [763] ) spids: [759 762] ) (FuncDef name: rpm_provides body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:providers) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$primary')}) (C {($ VSub_Name '$xp')} { (DQ ('//*[') ($ VSub_Name '$loc') ("'package'][./*[") ($ VSub_Name '$loc') ("'format'] ") (' /*[') ($ VSub_Name '$loc') ("'provides']/*[") ($ VSub_Name '$loc') ("'entry'][@name='") ($ VSub_Number '$1') ("']]/*[") ($ VSub_Name '$loc') ("'name']") ) } {(-)} ) (C {(sed)} {(-e)} {(SQ <'s|<name>||g'>)} {(-e)} {(SQ <'s|</name>|\\n|g'>)} ) (C {(sort)} {(-u)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [823 875] ) } spids: [822] ) ] spids: [822] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$providers')}) (C {(wc)} {(-w)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [882 892] ) } {(-gt)} {(1)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('warning: found multiple providers ') ($ VSub_Name '$providers') (' for ') ($ VSub_Number '$1') (', adding all') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[914])] ) ] spids: [-1 901] ) ] spids: [-1 918] ) (C {(echo)} {($ VSub_Name '$providers')}) ] spids: [819] ) spids: [815 818] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newpkgs) op: Equal rhs: {($ VSub_Name '$toinstall')} spids: [928] ) ] spids: [928] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:allrequires) op:Equal rhs:{(DQ )} spids:[931])] spids: [931] ) (While cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$newpkgs'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:newrequires) op:Equal rhs:{(DQ )} spids:[951])] spids: [951] ) (ForEach iter_name: i iter_words: [{($ VSub_Name '$newpkgs')}] do_arg_iter: False body: (DoGroup children: [ (ForEach iter_name: j iter_words: [ { (CommandSubPart command_list: (CommandList children: [(C {(rpm_requires)} {($ VSub_Name '$i')})] ) left_token: <Left_CommandSub '$('> spids: [974 978] ) } ] do_arg_iter: False body: (DoGroup children: [ (Case to_match: { (DQ (' ') ($ VSub_Name '$allrequires') (' ') ($ VSub_Name '$newrequires') (' ') ) } arms: [ (case_arm pat_list: [ {(Lit_Other '*') (DQ (' ') ($ VSub_Name '$j') (' ')) (Lit_Other '*') } ] spids: [1001 1008 1014 -1] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newrequires) op: Equal rhs: { (DQ ($ VSub_Name '$newrequires') (' ') ($ VSub_Name '$j')) } spids: [1021] ) ] spids: [1021] ) ] spids: [1017 1018 1027 -1] ) ] spids: [988 998 1030] ) ] spids: [981 1033] ) spids: [973 979] ) ] spids: [965 1036] ) spids: [961 963] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:allrequires) op: Equal rhs: {(DQ ($ VSub_Name '$allrequires') (' ') ($ VSub_Name '$newrequires'))} spids: [1039] ) ] spids: [1039] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:newpkgs) op:Equal rhs:{(DQ )} spids:[1047])] spids: [1047] ) (ForEach iter_name: i iter_words: [{($ VSub_Name '$newrequires')}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:provides) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(rpm_provides)} {($ VSub_Name '$i')})] ) left_token: <Left_CommandSub '$('> spids: [1066 1070] ) ) } spids: [1064] ) ] spids: [1064] ) (Case to_match: {(DQ (' ') ($ VSub_Name '$toinstall') (' ') ($ VSub_Name '$newpkgs') (' '))} arms: [ (case_arm pat_list: [ {(Lit_Other '*') (DQ (' ') ($ VSub_Name '$provides') (' ')) (Lit_Other '*') } ] spids: [1087 1094 1100 -1] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newpkgs) op: Equal rhs: {(DQ ($ VSub_Name '$newpkgs') (' ') ($ VSub_Name '$provides'))} spids: [1107] ) ] spids: [1107] ) ] spids: [1103 1104 1113 -1] ) ] spids: [1074 1084 1116] ) ] spids: [1061 1119] ) spids: [1057 1059] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:toinstall) op: Equal rhs: {(DQ ($ VSub_Name '$toinstall') (' ') ($ VSub_Name '$newpkgs'))} spids: [1122] ) ] spids: [1122] ) ] spids: [948 1129] ) ) (C {(mkdir)} {(-p)} {(noarch)}) (ForEach iter_name: i iter_words: [{($ VSub_Name '$toinstall')}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgi) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(rpm_select)} {($ VSub_Name '$i')})] ) left_token: <Left_CommandSub '$('> spids: [1151 1155] ) } spids: [1150] ) ] spids: [1150] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:checksum) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$pkgi')}) (C {($ VSub_Name '$xp')} {(DQ ('/package/checksum/text()'))} {(-)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [1159 1173] ) } spids: [1158] ) ] spids: [1158] ) (C {(eval)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$pkgi')}) (C {($ VSub_Name '$xp')} {(DQ ('/package/location/@href'))} {(-)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [1178 1192] ) } ) (C {(echo)} {(DQ ('downloading ') ($ VSub_Name '$href'))}) (C { (CommandSubPart command_list: (CommandList children:[(C {(dirname)} {(DQ ($ VSub_Number '$0'))})]) left_token: <Left_CommandSub '$('> spids: [1203 1209] ) (/../../deps/tools/jldownload) } {($ VSub_Name '$href')} {($ VSub_Name '$url') (/) ($ VSub_Name '$href')} ) (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$checksum') (' *') ($ VSub_Name '$href'))}) (C {(sha256sum)} {(-c)}) ] negated: False ) (C {(7z)} {(x)} {(-y)} {($ VSub_Name '$href')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cpiofile) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(basename)} {($ VSub_Name '$href')}) (C {(sed)} {(SQ <'s/.rpm$/.cpio/'>)}) ] negated: False ) ] ) left_token: <Left_CommandSub '$('> spids: [1244 1256] ) } spids: [1243] ) ] spids: [1243] ) (C {(rm)} {($ VSub_Name '$href')}) (C {(7z)} {(x)} {(-y)} {($ VSub_Name '$cpiofile')}) (C {(rm)} {($ VSub_Name '$cpiofile')}) ] spids: [1147 1277] ) spids: [1143 1145] ) (C {(rmdir)} {(--ignore-fail-on-non-empty)} {(noarch)}) ] )