From duncan at wald.ucdavis.edu  Sat Oct 20 23:17:20 2007
From: duncan at wald.ucdavis.edu (Duncan Temple Lang)
Date: Sun, 21 Oct 2007 10:17:20 +1300
Subject: [Rd] install.packages() and configure.args
In-Reply-To: <47190187.50507@fhcrc.org>
References: <47190187.50507@fhcrc.org>
Message-ID: <471A7060.2000709@wald.ucdavis.edu>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Herve

 The "best" way to specify configure.args when there are multiple
packages (either directly or via dependencies) is to use names on
the character vector, i.e.

   install.packages("Rgraphviz",
                    rep="http://bioconductor.org/packages/2.1/bioc",

configure.args=c(Rgraphviz="--with-graphviz=/some/non/standard/place"))


This allows one to specify command line arguments for many packages
simultaneously and unambiguously.

install.packages() only uses configure.args when there are no names
if there is only one package being installed.  It could be made
smarter to apply this to the first of the pkgs only, or
to identify the packages as direct and dependent.  But it is not
obvious it is worth the effort as using names on configure.args
provides a complete solution and is more informative.

Thanks for pointing this out.

 D.

Herve Pages wrote:
> Hi,
> 
> In the case where install.packages("packageA") also needs to install
> required package "packageB", then what is passed thru the 'configure.args'
> argument seems to be lost when it's the turn of packageA to be installed
> (the last package to get installed).
> 
> This is not easy to reproduce but let's say you have the graphviz libraries
> installed on your system, but you don't have the graph package installed yet.
> Then this
> 
>   install.packages("Rgraphviz",
>                    rep="http://bioconductor.org/packages/2.1/bioc",
>                    configure.args="--with-graphviz=/some/non/standard/place")
> 
> will fail because --with-graphviz=/some/non/standard/place doesn't seem to be
> passed to Rgraphviz's configure script. But if you already have the graph package,
> then it will work.
> 
> Cheers,
> H.
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHGnBg9p/Jzwa2QP4RAp0NAJ9Qe/thxdrX8CpFVcRP2UoHk1txFACeL9uM
twmID5hsclilHhIfPsuFt7A=
=vCz1
-----END PGP SIGNATURE-----



[Rd] install.packages() and configure.args
Duncan Temple Lang