On Mon, Feb 13, 2012 at 08:56:55AM -0600, Dirk Eddelbuettel wrote: > I really just want to depend with >= on the R version (as it is called in > Debian !!) building this package. Going with parsing the changelog is better > than asking R for its version as R does not know about its Debian > (sub-)version.
The real question to decide about this is: Is there any need to know the Debian (sub-)version. Do we really need to Depend from a specific (sub-)version or is it from the r-cran-xyz package point of view only relevant to depend from a certain R (upstream!!) version? While we noe have found proper expressions to find the version we need we need to decide what is actually needed. Alternatively we might do the following: echo "R:Depends=r-base-core (>= $(shell R --version | head -n1 | perl -ne 'print / +([0-9]\.[0-9]+\.[0-9])/')~)" >> debian/$(package).substvars echo "R-Debian:Depends=r-base-core (>= $(shell dpkg-parsechangelog | awk '/^Version/ { print $2 }')" >> debian/$(package).substvars When doing so we end up with feeding two substvars into the substvars file and in the control file you can either pick ${R:Depends} if you mean the R version or ${R-Debian:Depends} if you want to address any specific Debian package of r-base-core. Kind regards Andreas. PS: Code is untested - just to base the discussion upon it. I'd volunteer to test for sure if some consensus is reached. -- http://fam-tille.de -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org