From hb at maths.lth.se  Mon Mar 15 20:13:13 2004
From: hb at maths.lth.se (Henrik Bengtsson)
Date: Mon Mar 15 20:14:22 2004
Subject: [Rd] R v1.9.0 alpha w/ Rtools: gzip problem
Message-ID: <000401c40ac1$94abf600$b70040d5@maths.lth.se>

Hi, Gordon Smyth brought the following problem to my attention.

PROBLEM/"BUG":

Using R v1.9.0 alpha for Windows and the latest Rtools from Brian
Ripley you get the following problem trying to R CMD build a package
(or a bundle);

>R CMD build R.basic
* checking for file 'R.basic/DESCRIPTION' ... OK
* preparing 'R.basic':
* checking whether 'INDEX' is up-to-date ... NO
* use '--force' to overwrite the existing 'INDEX'
* removing junk files
* building 'R.basic_0.36.tar.gz'
/cygdrive/C/users/braju.com.R/R.basic/R.basic_0.36.tar: No such file
or directory

TROUBLESHOOTING:

Trying to gzip the tar-file manually (using gzip in B. Ripley's
Rtools) you get the same error;

>gzip /cygdrive/C/users/braju.com.R/R.basic/R.basic_0.36.tar
/cygdrive/C/users/braju.com.R/R.basic/R.basic_0.36.tar: No such file
or directory

HOWEVER, if you do

>cd /cygdrive/C/users/braju.com.R/R.basic/
>gzip R.basic_0.36.tar

it works. This is also the strategy in the R v1.8.1 build script. In
the R v1.9.0 alpha script all gzip calls are on absolute pathnames;

	R_system("$tar chf $filepath $pkgname");
	R_system("gzip -9f $filepath");

cf.

	system("$tar chf $filepath $pkgname");
	chdir($startdir);
	rmtree($tmpdir);
	system("gzip -9f $filename");

Modifying the build v1.9.0 alpha to do the latter things works again.

More hints: Trying different strategies, it looks like gzip has a
problem with /cygdrive/ and/or /cygdrive/C/. It is not clear from
README.packages or README in Rtools if/how gzip has been modified.
Strangely(?) though, putting the tar-file in /tmp/ and doing

>gzip /tmp/R.basic_0.36.tar

works just fine.

Best wishes

Henrik Bengtsson

Dept. of Mathematical Statistics @ Centre for Mathematical Sciences
Lund Institute of Technology/Lund University, Sweden 
(Sweden +1h UTC, Melbourne +11 UTC, Calif. -8h UTC)
+46 708 909208 (cell), +46 46 320 820 (home), 
+1 (508) 464 6644 (global fax),
+46 46 2229611 (off), +46 46 2224623 (dept. fax)
h b @ m a t h s . l t h . s e, http://www.maths.lth.se/~hb/


[Rd] R v1.9.0 alpha w/ Rtools: gzip problem
Henrik Bengtsson