From prokaj at cs.elte.hu  Thu Aug 23 17:27:11 2007
From: prokaj at cs.elte.hu (prokaj at cs.elte.hu)
Date: Thu, 23 Aug 2007 17:27:11 +0200 (CEST)
Subject: [Rd] missing --vanilla option in INSTALL (PR#9877)
Message-ID: <20070823152711.5B88F206FA@slim.kubism.ku.dk>

Full_Name: Vilmos Prokaj
Version: 2.5.1
OS: windows
Submission from: (NULL) (81.183.3.216)


I'm not sure that this is really a bug, if not I do not understand why should it
be in this way.

Most of the scripts used to build and install new packages calls the R program
with the 
--slave --vanilla command line options. In the INSTALL script however we can
find the following lines


if($opt_library){
    # remove quotes around the library path
    $opt_library =~ s/^['"]//; $opt_library =~ s/['"]$//; #'"
    chdir($opt_library) ||
	die "Error: cannot change to library directory \$opt_library'\n";
    $library = cwd();
    $library = Win32::GetShortPathName($library) if $library =~ / /;
    my $R_LIBS = $ENV{'R_LIBS'};
    $ENV{'R_LIBS'} = join(";", $library, $R_LIBS);
    chdir($startdir);
} else {
    my @out = R_runR("cat('\n~~~', .libPaths()[1], '\n', sep = '')",
"--slave");
    foreach $f (@out) {
	if($f =~ /^~~~/) {
	    $library = $f;
	    $library =~ s/^~~~//;
	}
    }
    $library = Win32::GetShortPathName($library) if $library =~ / /;
    print "installing to '$library'\n";
}

I think that in the R_runR function there should be also a --vanilla option,
otherwise the process might be slow depending on the content of  .Rprofile
file.

The linenumber of the critical point is 132.

Sincerely yours 
  Vilmos Prokaj



[Rd] missing --vanilla option in INSTALL (PR#9877)
prokaj at cs.elte.hu