Skip to content

available.packages (PR#9841)

1 message · Zivan Karaman

#
------=_Part_60506_18925213.1187708869863
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Thank you very much for your explanation, it woks correctly indeed.
On 8/19/07, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
,
------=_Part_60506_18925213.1187708869863
Content-Type: text/html; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<p class=3D"MsoNormal" style=3D"MARGIN: 0cm 0cm 0pt"><span lang=3D"EN-GB" s=
tyle=3D"mso-ansi-language: EN-GB"><font size=3D"2"><font face=3D"Verdana">T=
hank you very much for your explanation, it woks correctly indeed.</font></=
font></span>
</p>
<p class=3D"MsoNormal" style=3D"MARGIN: 0cm 0cm 0pt"><span lang=3D"EN-GB" s=
tyle=3D"mso-ansi-language: EN-GB"><font size=3D"2"><font face=3D"Verdana">&=
nbsp;</font></font></span></p><br><br>
<div><span class=3D"gmail_quote">On 8/19/07, <b class=3D"gmail_sendername">=
Prof Brian Ripley</b> &lt;<a href=3D"mailto:ripley at stats.ox.ac.uk">ripley at s=
tats.ox.ac.uk</a>&gt; wrote:</span>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">The documented specification is =
file:///d:/CRAN (as specified by RFC1738),<br>so this is working correctly.
<br><br>The CHANGES file for 2.2.0 says:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;o&n=
bsp;&nbsp; file:// URLs are now interpreted by download.file(),<br>&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;download.packages() and url() in th=
e same way as Mozilla-based<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;browsers.&nbsp;&nbsp;That is, the expected form is
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file:///d:/path/to/file<br><br>&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with *three* slashes.<br><br>The point is =
that this is file:// + host + / + path/to/file, and host is<br>missing.&nbs=
p;&nbsp;That some versions of IE did not follow the standard is part of
<br>the confusion here.<br><br>Note that ?available.packages does say<br><b=
r>&nbsp;&nbsp;&nbsp;&nbsp; If a repository is<br>&nbsp;&nbsp;&nbsp;&nbsp; l=
ocal, i.e., the URL starts with &#39;&quot;file:&quot;&#39;, then the packa=
ges are<br>&nbsp;&nbsp;&nbsp;&nbsp; not downloaded but used directly.&nbsp;=
&nbsp;(Both &#39;&quot;file:&quot;&#39; and
<br>&nbsp;&nbsp;&nbsp;&nbsp; &#39;&quot;file:///&quot;&#39; are allowed as =
prefixes to a file path, the latter<br>&nbsp;&nbsp;&nbsp;&nbsp; for an abso=
lute file path.)<br><br>but &#39;file:&#39; does not work with drives on Wi=
ndows.&nbsp;&nbsp;That seems clearly to<br>rule out your usage.
<br><br><br>On Fri, 10 Aug 2007, <a href=3D"mailto:zivan.karaman at gmail.com"=
ULL) (
<a href=3D"http://195.6.68.214">195.6.68.214</a>)<br>&gt;<br>&gt;<br>&gt; I=
 think that I have encountered a bug in the function &quot;available.packag=
es&quot; when<br>&gt; using a local repository (file://=85) on Windows.<br>
&gt;<br>&gt; Version information:<br>&gt; platform&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; i386-pc-mingw32<br>&gt; arch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp; i386<br>&gt; os&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mingw32<br>&gt; system&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i386, mingw32<br>&gt; status<br>&gt; maj=
or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2<br>&gt; min=
or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
5.1<br>&gt; year&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; 2007<br>&gt; month&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;06<br>&gt; day&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;27<br>&gt; svn rev&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;42083<br>&gt; language&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; R<br>&gt;=
 version.string R version 2.5.1 (2007-06-27)<br>&gt;<br>&gt; I have made a =
copy of the CRAN &quot;/bin/windows/contrib/2.5&quot; directory in the
<br>&gt; &quot;D:/CRAN&quot; folder on my machine.<br>&gt;<br>&gt; When I i=
ssue the command:<br>&gt;<br>&gt; available.packages(contrib.url(&quot;file=
://D:/CRAN&quot;))<br>&gt;<br>&gt; I get the follwoing message:<br>&gt; Err=
or in gzfile(file, &quot;r&quot;) : unable to open connection
<br>&gt; In addition: Warning message:<br>&gt; cannot open compressed file =
&#39;:/CRAN/bin/windows/contrib/2.5/PACKAGES&#39; in:<br>&gt; gzfile(file, =
&quot;r&quot;)<br>&gt;<br>&gt; Looking at the source code, I&#39;ve spotted=
 the following lines which seem to cause
<br>&gt; trouble:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (.Platform$OS.type =3D=3D &quot;windows&qu=
ot;) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (length(grep(&quot;[A-Za-z]:&quot;, t=
mpf)))<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tmpf &lt;- substring(tmpf, 2=
)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;}<br>&gt; Deleting them, the function works OK.<br>&gt;<br>&gt; __________=
____________________________________<br>&gt; <a href=3D"mailto:R-devel at r-pr=
oject.org">R-devel at r-project.org</a> mailing list<br>&gt;=20
<a href=3D"https://stat.ethz.ch/mailman/listinfo/r-devel">https://stat.ethz=
.ch/mailman/listinfo/r-devel</a><br>&gt;<br><br>--<br>Brian D. Ripley,&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=3D"mailto:ripley at stats.ox.ac.uk">ripley=
@stats.ox.ac.uk
</a><br>Professor of Applied Statistics,&nbsp;&nbsp;<a href=3D"http://www.s=
tats.ox.ac.uk/~ripley/">http://www.stats.ox.ac.uk/~ripley/</a><br>Universit=
y of Oxford,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; Tel:&nbsp;&nbsp;+44 1865 272861 (self)<br>1 South Parks Road,&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +44 1865 272866 (PA)
<br>Oxford OX1 3TG, UK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fax:&nbsp;&nbsp;+44 1865 272595<=
/blockquote></div><br>

------=_Part_60506_18925213.1187708869863--