Skip to content

(PR#7163) Install packages does not work on Win2003 serv er

3 messages · Walke, Rainer, Uwe Ligges, Brian Ripley

#
> Is the share form which R has been started mounted on a drive
letter or 
	> do you start via the UNC path?
	> Which package is it? Does it also happen for CRAN packages?
	> I guess any security setting either on the Server or the client
are 
	> blocking the installation. But it is really hard to guess what it
really 
	> is... You might want to ask your local IT stuff.

	> Uwe Ligges

	Thanks for your e-mail message. Yes, the share has been mounted on a
drive letter P.
	Unfortunately, it happens for all packages starting from abind...
	And it happens if I load a package directly from CRAN as well.
	Do you know which part of the R code creates this temporary file*
directories in the library subdirectory?

	Rainer Walke



+++++
This mail has been sent through the MPI for Demographic Rese...{{dropped}}
#
Walke, Rainer wrote:

            
Yes, really not hard to find: The second call within function 
unpackPkg() in install.packages().


Uwe Ligges
#
On Fri, 13 Aug 2004, Walke, Rainer wrote:

            
Why don't *you* know?  It is install.packages, surprisingly enough, in its
internal function unpackPkg, and running that under debug would show you
what is going on.  Once again, remember only you can do this as we cannot 
reproduce your claims.

Do remember you have already been told that you are using an unsupported 
OS, and quite possible a file system that has never been tested and is not 
supported by the compilers we use to build R.

One possible issue is that code uses

                file.rename(file.path(tmpDir, curPkg), instPath)

Internally that boils down to

int Rwin_rename(char *from, char *to)
{
    int res = 0;
    OSVERSIONINFO verinfo;

    verinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
    GetVersionEx(&verinfo);
    switch(verinfo.dwPlatformId) {
    case VER_PLATFORM_WIN32_NT:
	res = (MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING) == 0);
	break;
    default:
	if (!DeleteFile(to) && GetLastError() != ERROR_FILE_NOT_FOUND)
	    return 1;
	res = (MoveFile(from, to) == 0);
    }
    return res;
}

Now, what your unsupported OS reports for dwPlatformId is undocumented in 
the MinGW header files (and in the VC6 docs), and your OS did not exist 
when that was written.  Given the choices

#define VER_PLATFORM_WIN32s 0
#define VER_PLATFORM_WIN32_WINDOWS 1
#define VER_PLATFORM_WIN32_NT 2

it is the third according the Microsoft's current Platform SDK, but is 
that correct (it seems to predate the release of your OS)?  Please check 
it for us.

BDR