#- $Id$ $ package urpm_pkg; sub flag_available { return 1; } package pkgs; use log; sub rpmDbOpen { #- install_steps:343 } sub packageByName { #- install_steps:344 return bless {}, 'urpm_pkg'; #- we'll need to call flag_available on it } sub selectPackage { #- install_steps:344 } sub packagesToInstall { #- install_steps:346 return (); } 1; le='drakx Git repository'/> <link rel='vcs-git' href='ssh://git@git.mageia.org/software/drakx' title='drakx Git repository'/> </head> <body> <div id='cgit'><table id='header'> <tr> <td class='logo' rowspan='2'><a href='/'><img src='//nav.mageia.org/css/mageia-logo-nav-3.png' alt='cgit logo'/></a></td> <td class='main'><a href='/'>index</a> : <a title='drakx' href='/software/drakx/'>drakx</a></td><td class='form'><form method='get'> <input type='hidden' name='id' value='5820f0fd91c7081971d66edcb3e173f04597204d'/><select name='h' onchange='this.form.submit();'> <option value='distro/mdv2007.1'>distro/mdv2007.1</option> <option value='distro/mdv2008.0'>distro/mdv2008.0</option> <option value='distro/mdv2008.1'>distro/mdv2008.1</option> <option value='distro/mdv2009.0'>distro/mdv2009.0</option> <option value='distro/mdv2009.1'>distro/mdv2009.1</option> <option value='distro/mdv2010.0'>distro/mdv2010.0</option> <option value='distro/mes5'>distro/mes5</option> <option value='distro/mes5-2.6.33'>distro/mes5-2.6.33</option> <option value='distro/mes6'>distro/mes6</option> <option value='distro/mga1'>distro/mga1</option> <option value='distro/mga2'>distro/mga2</option> <option value='distro/mga3'>distro/mga3</option> <option value='distro/mga4'>distro/mga4</option> <option value='distro/mga5'>distro/mga5</option> <option value='distro/mga6'>distro/mga6</option> <option value='distro/mga7'>distro/mga7</option> <option value='distro/mga8'>distro/mga8</option> <option value='distro/mga9'>distro/mga9</option> <option value='master'>master</option> <option value='topic/Corpo_2_1'>topic/Corpo_2_1</option> <option value='topic/KA9_0'>topic/KA9_0</option> <option value='topic/MDK-10-update'>topic/MDK-10-update</option> <option value='topic/MDK-10_1-update'>topic/MDK-10_1-update</option> <option value='topic/MDK-10_2-update'>topic/MDK-10_2-update</option> <option value='topic/MDK-2006_0-update'>topic/MDK-2006_0-update</option> <option value='topic/MDK92-branch'>topic/MDK92-branch</option> <option value='topic/MDKC_1_0'>topic/MDKC_1_0</option> <option value='topic/PCMCIA_CS_DISTRO'>topic/PCMCIA_CS_DISTRO</option> <option value='topic/R9_0-64bit-branch'>topic/R9_0-64bit-branch</option> <option value='topic/R9_1_HP-branch'>topic/R9_1_HP-branch</option> <option value='topic/a'>topic/a</option> <option value='topic/before_matchbox_wm'>topic/before_matchbox_wm</option> <option value='topic/bug-13680'>topic/bug-13680</option> <option value='topic/dietlibc'>topic/dietlibc</option> <option value='topic/efi'>topic/efi</option> <option value='topic/extlinux'>topic/extlinux</option> <option value='topic/firewall'>topic/firewall</option> <option value='topic/gdk-pixbuf-0-branch'>topic/gdk-pixbuf-0-branch</option> <option value='topic/gi-ppc'>topic/gi-ppc</option> <option value='topic/ia64-8_1'>topic/ia64-8_1</option> <option value='topic/mandrakesoft'>topic/mandrakesoft</option> <option value='topic/mlcd4'>topic/mlcd4</option> <option value='topic/ppp'>topic/ppp</option> <option value='topic/rp-pppoe'>topic/rp-pppoe</option> <option value='topic/switching_to_dnf'>topic/switching_to_dnf</option> <option value='topic/switching_to_urpmi'>topic/switching_to_urpmi</option> <option value='topic/unlabeled-1.1.1'>topic/unlabeled-1.1.1</option> <option value='topic/v_webmin_0_87'>topic/v_webmin_0_87</option> <option value='topic/x86_64-branch'>topic/x86_64-branch</option> <option value='user/animtim/designWork'>user/animtim/designWork</option> <option value='user/colin/rescue-systemd'>user/colin/rescue-systemd</option> <option value='user/ennael/mga6'>user/ennael/mga6</option> <option value='user/erwan/bug-13680'>user/erwan/bug-13680</option> <option value='user/jibz/aarch64'>user/jibz/aarch64</option> <option value='user/martinw/mga6'>user/martinw/mga6</option> <option value='user/pterjan/arm64'>user/pterjan/arm64</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>Mageia Installer and base platform for many utilities</td><td class='sub right'>Thierry Vignaud [tv]</td></tr></table> <table class='tabs'><tr><td> <a href='/software/drakx/?h=15.71'>summary</a><a href='/software/drakx/refs/?h=15.71&id=5820f0fd91c7081971d66edcb3e173f04597204d'>refs</a><a href='/software/drakx/log/perl-install/http.pm?h=15.71'>log</a><a class='active' href='/software/drakx/tree/perl-install/http.pm?h=15.71&id=5820f0fd91c7081971d66edcb3e173f04597204d'>tree</a><a href='/software/drakx/commit/perl-install/http.pm?h=15.71&id=5820f0fd91c7081971d66edcb3e173f04597204d'>commit</a><a href='/software/drakx/diff/perl-install/http.pm?h=15.71&id=5820f0fd91c7081971d66edcb3e173f04597204d'>diff</a><a href='/software/drakx/stats/perl-install/http.pm?h=15.71'>stats</a></td><td class='form'><form class='right' method='get' action='/software/drakx/log/perl-install/http.pm'> <input type='hidden' name='h' value='15.71'/><input type='hidden' name='id' value='5820f0fd91c7081971d66edcb3e173f04597204d'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/software/drakx/tree/?h=15.71&id=5820f0fd91c7081971d66edcb3e173f04597204d'>root</a>/<a href='/software/drakx/tree/perl-install?h=15.71&id=5820f0fd91c7081971d66edcb3e173f04597204d'>perl-install</a>/<a href='/software/drakx/tree/perl-install/http.pm?h=15.71&id=5820f0fd91c7081971d66edcb3e173f04597204d'>http.pm</a></div><div class='content'>blob: 9da302513d9510d05ce034c394e4c230423e168d (<a href='/software/drakx/plain/perl-install/http.pm?h=15.71&id=5820f0fd91c7081971d66edcb3e173f04597204d'>plain</a>) <table summary='blob content' class='blob'> <tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a> <a id='n2' href='#n2'>2</a> <a id='n3' href='#n3'>3</a> <a id='n4' href='#n4'>4</a> <a id='n5' href='#n5'>5</a> <a id='n6' href='#n6'>6</a> <a id='n7' href='#n7'>7</a> <a id='n8' href='#n8'>8</a> <a id='n9' href='#n9'>9</a> <a id='n10' href='#n10'>10</a> <a id='n11' href='#n11'>11</a> <a id='n12' href='#n12'>12</a> <a id='n13' href='#n13'>13</a> <a id='n14' href='#n14'>14</a> <a id='n15' href='#n15'>15</a> <a id='n16' href='#n16'>16</a> <a id='n17' href='#n17'>17</a> <a id='n18' href='#n18'>18</a> <a id='n19' href='#n19'>19</a> <a id='n20' href='#n20'>20</a> <a id='n21' href='#n21'>21</a> <a id='n22' href='#n22'>22</a> <a id='n23' href='#n23'>23</a> <a id='n24' href='#n24'>24</a> <a id='n25' href='#n25'>25</a> <a id='n26' href='#n26'>26</a> <a id='n27' href='#n27'>27</a> <a id='n28' href='#n28'>28</a> <a id='n29' href='#n29'>29</a> <a id='n30' href='#n30'>30</a> <a id='n31' href='#n31'>31</a> <a id='n32' href='#n32'>32</a> <a id='n33' href='#n33'>33</a> <a id='n34' href='#n34'>34</a> <a id='n35' href='#n35'>35</a> <a id='n36' href='#n36'>36</a> <a id='n37' href='#n37'>37</a> <a id='n38' href='#n38'>38</a> <a id='n39' href='#n39'>39</a> <a id='n40' href='#n40'>40</a> <a id='n41' href='#n41'>41</a> <a id='n42' href='#n42'>42</a> <a id='n43' href='#n43'>43</a> </pre></td> <td class='lines'><pre><code><span class="hl kwa">package</span> http<span class="hl opt">;</span> <span class="hl kwa">use</span> IO<span class="hl opt">::</span>Socket<span class="hl opt">;</span> <span class="hl kwa">use</span> install_any<span class="hl opt">;</span> <span class="hl kwa">use</span> network<span class="hl opt">;</span> <span class="hl kwc">my</span> <span class="hl kwb">$sock</span><span class="hl opt">;</span> <span class="hl kwa">sub</span> getFile<span class="hl opt">($) {</span> <span class="hl kwc">local</span><span class="hl opt">(</span><span class="hl kwb">$^W</span><span class="hl opt">) =</span> <span class="hl num">0</span><span class="hl opt">;</span> <span class="hl kwc">my</span> <span class="hl opt">(</span><span class="hl kwb">$host, $port, $path</span><span class="hl opt">) =</span> <span class="hl kwb">$ENV</span><span class="hl opt">{</span>URLPREFIX<span class="hl opt">} =~</span> m<span class="hl opt">,^</span>http<span class="hl opt">:</span><span class="hl kwd">//</span><span class="hl opt">([^</span><span class="hl kwd">/:]+)(?::(\d+))?(/</span>\S<span class="hl opt">*)</span>?<span class="hl kwb">$,</span><span class="hl opt">;</span> <span class="hl kwb">$host</span> <span class="hl opt">=</span> network<span class="hl opt">::</span>resolv<span class="hl opt">(</span><span class="hl kwb">$host</span><span class="hl opt">);</span> <span class="hl kwb">$path</span> <span class="hl opt">.=</span> <span class="hl str">"/"</span> <span class="hl opt">.</span> install_any<span class="hl opt">::</span>relGetFile<span class="hl opt">(</span><span class="hl kwb">$_</span><span class="hl opt">[</span><span class="hl num">0</span><span class="hl opt">]);</span> <span class="hl kwb">$sock</span><span class="hl opt">-></span><span class="hl kwc">close</span> <span class="hl kwa">if</span> <span class="hl kwb">$sock</span><span class="hl opt">;</span> <span class="hl kwb">$sock</span> <span class="hl opt">=</span> IO<span class="hl opt">::</span>Socket<span class="hl opt">::</span>INET-<span class="hl opt">></span><span class="hl kwd">new</span><span class="hl opt">(</span>PeerAddr <span class="hl opt">=></span> <span class="hl kwb">$host,</span> PeerPort <span class="hl opt">=></span> <span class="hl kwb">$port</span> <span class="hl opt">||</span> <span class="hl num">80</span><span class="hl opt">,</span> Proto <span class="hl opt">=></span> <span class="hl str">'tcp'</span><span class="hl opt">,</span> Timeout <span class="hl opt">=></span> <span class="hl num">60</span><span class="hl opt">)</span> <span class="hl kwc">or die</span> <span class="hl str">"can't connect "</span><span class="hl opt">;</span> <span class="hl kwb">$sock</span><span class="hl opt">-></span><span class="hl kwd">autoflush</span><span class="hl opt">;</span> <span class="hl kwc">print</span> <span class="hl kwb">$sock</span> <span class="hl kwc">join</span><span class="hl opt">(</span><span class="hl str">"</span><span class="hl esc">\015\012</span><span class="hl str">"</span> <span class="hl opt">=></span> <span class="hl str">"GET</span> <span class="hl ipl">$path</span> <span class="hl str">HTTP/1.0"</span><span class="hl opt">,</span> <span class="hl str">"Host:</span> <span class="hl ipl">$host</span><span class="hl str">"</span> <span class="hl opt">. (</span><span class="hl kwb">$port</span> <span class="hl opt">&&</span> <span class="hl str">":</span><span class="hl ipl">$port</span><span class="hl str">"</span><span class="hl opt">),</span> <span class="hl str">"User-Agent: DrakX/vivelinuxabaszindozs"</span><span class="hl opt">,</span> <span class="hl str">""</span><span class="hl opt">,</span> <span class="hl str">""</span><span class="hl opt">);</span>