[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Relation of 'Depends' and 'Imports' from R/CRAN to 'Depends' in 'debian/control'

Hi Carlos,

On Tue, Jan 24, 2012 at 05:05:24PM -0500, Carlos Borroto wrote:
> Hi All,
> I would like to work on packages from R/CRAN and Bioconductor.

Great.  I checked that you are a member of Debian Med packaging team and
thus you should have commit permissions to SVN where most of our R
packages reside (some of them are in Git as your example r-bioc-limma.)
So I would advise to commit your current state of work to the repository
of your choice even in a not finished state - just mark this by using
"UNRELEASED" as target distribution and perhaps add a TODO entry inside
the changelog.

> I'm
> using as a guide r-cran-rocr and r-bioc-limma. I was wondering if
> there is a easy translation from 'Depends' and 'Imports' in the CRAN
> packages to the 'Depends' fields in 'debian/control'.

I'm not really sure whether there is a 1:1 relation.  What I personally
do when building R packages is the following:  Use


to be pretty sure that all Build-Depends are fullfilled.  Once you
have all Build-Depends set this is usually the set of Depends you need
as well.
> Initially I though CRAN's 'Depends' meant, the package is needed for
> building and CRAN's 'Imports' meant, the package is needed when using.
> Which would translate to a 'Depends' entry on 'Source' and 'Package'
> respectively. This seems incorrect as for example when building
> reshape2[1], it only has 'Imports' dependencies, it fails with this
> error:
> dh_installdirs		usr/lib/R/site-library
> if test -f /usr/bin/xvfb-run; then 			\
> 			 xvfb-run -a 			\
> 				R CMD INSTALL -l
> /tmp/buildd/r-cran-reshape2-1.2.1/debian/r-cran-reshape2/usr/lib/R/site-library
> --clean     \
> 					 . ;	\
> 		else							\
> 			 R CMD INSTALL -l
> /tmp/buildd/r-cran-reshape2-1.2.1/debian/r-cran-reshape2/usr/lib/R/site-library
> 	\
> 					--clean  . ;\
> 		fi
> ERROR: dependencies 'plyr', 'stringr', 'lattice' are not available for
> package 'reshape2'
> So my question is, should I list in 'Source' and 'Package' all the
> dependencies listed in CRAN's 'Depends' and 'Imports'?

I'm not very competent in R itself but if the build process asks for
those packages, just add them.  This can not be wrong.

Kind regards and thanks for considering building such packages in Debian
Med team



Reply to: