Debian Bug report logs - #659163
r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk

version graph

Package: r-base-dev; Maintainer for r-base-dev is Dirk Eddelbuettel <edd@debian.org>; Source for r-base-dev is src:r-base.

Reported by: Andreas Tille <tille@debian.org>

Date: Wed, 8 Feb 2012 20:57:02 UTC

Severity: wishlist

Tags: patch

Fixed in version r-base/2.14.2~20120222-1

Done: Dirk Eddelbuettel <edd@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-med@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#659163; Package r-base-dev. (Wed, 08 Feb 2012 20:57:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
New Bug report received and forwarded. Copy sent to debian-med@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>. (Wed, 08 Feb 2012 20:57:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Wed, 08 Feb 2012 21:54:24 +0100
Package: r-base-dev
Severity: wishlist
Tags: patch

Hi,

as discussed on the mailing list starting at

   http://lists.debian.org/debian-med/2012/02/msg00074.html

I'm providing hereby the patch which would be quite helpful for all R
packages maintained by the Debian Med team and several of Debian Science
team.

Remark: The patch is totally non-invasive to any existing package.  It
just appends the R version which was used to build the package to
debian/$(package).substvars.  If you do not use ${R:Depends} in your
debian/control file the patch has no effect at all and I can not see
any chance to break any existing package.  I have tested the patch
with one arch=all and one arch=any package.

Thanks for considering the patch

       Andreas.

diff -ubrN r-base-2.14.1.orig/debian/r-cran.mk r-base-2.14.1/debian/r-cran.mk
--- r-base-2.14.1.orig/debian/r-cran.mk 2012-02-08 21:30:52.000000000 +0100
+++ r-base-2.14.1/debian/r-cran.mk      2012-02-08 21:23:23.000000000 +0100
@@ -61,6 +61,9 @@
                 ## create the target directory
                dh_installdirs          $(debRdir)
                 ##
+               ## create R:Depends substvar containing used R version
+               echo "R:Depends=r-base-core (>= $(shell R --version | head -n1 | perl -ne 'print / +([0-9]\.[0-9]+\.[0-9])/')~)" >> debian/$(package).substvars
+               ##
                 ## call R to install the sources we're looking at
                 ## use this inside xvfb-run if this wrapper is installed
                if test -f /usr/bin/xvfb-run; then                      \


-- System Information:
Debian Release: 6.0.4
Architecture: i386 (i686)

Kernel: Linux 2.6.36-xenU-4814-i386 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 13:36:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dirk Eddelbuettel <edd@debian.org>:
Extra info received and forwarded to list. (Mon, 13 Feb 2012 13:36:08 GMT) Full text and rfc822 format available.

Message #10 received at submit@bugs.debian.org (full text, mbox):

From: Dirk Eddelbuettel <edd@debian.org>
To: Andreas Tille <tille@debian.org>, 659163@bugs.debian.org
Cc: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 07:33:06 -0600
Hi Andreas,

Sorry, had a hectic week last week and didn't see this report til the weekend.

On 8 February 2012 at 21:54, Andreas Tille wrote:
| Package: r-base-dev
| Severity: wishlist
| Tags: patch
| 
| Hi,
| 
| as discussed on the mailing list starting at
| 
|    http://lists.debian.org/debian-med/2012/02/msg00074.html
| 
| I'm providing hereby the patch which would be quite helpful for all R
| packages maintained by the Debian Med team and several of Debian Science
| team.
| 
| Remark: The patch is totally non-invasive to any existing package.  It
| just appends the R version which was used to build the package to
| debian/$(package).substvars.  If you do not use ${R:Depends} in your
| debian/control file the patch has no effect at all and I can not see
| any chance to break any existing package.  I have tested the patch
| with one arch=all and one arch=any package.
| 
| Thanks for considering the patch

Yes, it looks good.  

We will need to have package Build-Depends on "r-base-dev (>= 2.14.2)" as R
2.14.2 comes out on Feb 29; we can test til then.  [ And yes, you can of
course also use thje precise minor release 2.14.1-2 this goes into... ]

Dirk
 
|        Andreas.
| 
| diff -ubrN r-base-2.14.1.orig/debian/r-cran.mk r-base-2.14.1/debian/r-cran.mk
| --- r-base-2.14.1.orig/debian/r-cran.mk 2012-02-08 21:30:52.000000000 +0100
| +++ r-base-2.14.1/debian/r-cran.mk      2012-02-08 21:23:23.000000000 +0100
| @@ -61,6 +61,9 @@
|                  ## create the target directory
|                 dh_installdirs          $(debRdir)
|                  ##
| +               ## create R:Depends substvar containing used R version
| +               echo "R:Depends=r-base-core (>= $(shell R --version | head -n1 | perl -ne 'print / +([0-9]\.[0-9]+\.[0-9])/')~)" >> debian/$(package).substvars
| +               ##
|                  ## call R to install the sources we're looking at
|                  ## use this inside xvfb-run if this wrapper is installed
|                 if test -f /usr/bin/xvfb-run; then                      \
| 
| 
| -- System Information:
| Debian Release: 6.0.4
| Architecture: i386 (i686)
| 
| Kernel: Linux 2.6.36-xenU-4814-i386 (SMP w/1 CPU core)
| Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
| Shell: /bin/sh linked to /bin/dash
| 
| 

-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 13:36:17 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dirk Eddelbuettel <edd@debian.org>:
Extra info received and forwarded to list. (Mon, 13 Feb 2012 13:36:19 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 13:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dirk Eddelbuettel <edd@debian.org>:
Extra info received and forwarded to list. (Mon, 13 Feb 2012 13:54:03 GMT) Full text and rfc822 format available.

Message #20 received at submit@bugs.debian.org (full text, mbox):

From: Dirk Eddelbuettel <edd@debian.org>
To: Andreas Tille <tille@debian.org>, 659163@bugs.debian.org
Cc: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 07:51:20 -0600
Actually, I just realized a case where it may not help and can possibly do damage.

I regularly do pre-releases leading to R releases.  During those I use
versions like (see changelog)

r-base (2.14.0-1) unstable; urgency=low
[...]
 -- Dirk Eddelbuettel <edd@debian.org>  Mon, 31 Oct 2011 05:00:31 -0500

r-base (2.14.0~20111027-1) unstable; urgency=low
[...]
 -- Dirk Eddelbuettel <edd@debian.org>  Thu, 27 Oct 2011 12:59:54 -0500

r-base (2.14.0~20111021-1) unstable; urgency=low
[...]
 -- Dirk Eddelbuettel <edd@debian.org>  Fri, 21 Oct 2011 14:56:51 -0500

r-base (2.14.0~20111015-1) unstable; urgency=low
[...]
 -- Dirk Eddelbuettel <edd@debian.org>  Sun, 16 Oct 2011 00:39:15 -0500


During this two-week period, I fear we may not have "buildability" as these
versions would have identified (as R is concerned) as 2.14.0.  

But I guess as your patch is written, with the "r-base-dev (>= $(shell ...)"
we would be ok as we have

   2.14.0-1  (first release)     >=      2.14.0~201110xx-y  (rc release)

so there would always have been a 2.14.0 ?

I am trying to think of a past transition where this could have created a
problem.  It may just work...

The alternative would be to have the R package create a versioning script
(similar to r-cran.mk) that read the version from the Debian changelog (or
directly from dpkg, apt, ...) for the Debian R package, rather than querying
the R program:

edd@max:~$ dpkg -s r-base-dev | grep Version | perl -ne 'print / +([0-9]+\.[0-9]+\.[0-9]+)/'
2.14.1

or even

edd@max:~$ dpkg -s r-base-dev | grep Version | perl -ne 'print / +([0-9]+\.[0-9]+\.[0-9]+-[a-z0-9]+\b)/'
2.14.1-1oneiric

(on my Ubuntu box where I type this ?

We have to be very careful about the regexp.

Dirk


-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 13:54:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dirk Eddelbuettel <edd@debian.org>:
Extra info received and forwarded to list. (Mon, 13 Feb 2012 13:54:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 14:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
Extra info received and forwarded to list. Copy sent to Dirk Eddelbuettel <edd@debian.org>. (Mon, 13 Feb 2012 14:09:04 GMT) Full text and rfc822 format available.

Message #30 received at 659163@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: Dirk Eddelbuettel <edd@debian.org>
Cc: 659163@bugs.debian.org
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 15:05:02 +0100
On Mon, Feb 13, 2012 at 07:33:06AM -0600, Dirk Eddelbuettel wrote:
> Sorry, had a hectic week last week and didn't see this report til the weekend.

No problem.
 
> Yes, it looks good.  
> 
> We will need to have package Build-Depends on "r-base-dev (>= 2.14.2)" as R
> 2.14.2 comes out on Feb 29; we can test til then.  [ And yes, you can of
> course also use thje precise minor release 2.14.1-2 this goes into... ]

Can't wait to test the new feature as soon as it hits unstable. :-)
 
BTW, would you also consider including the patch from #652456 either in
the submitted form or as a separate script r-cran-quilt.mk which just
has the patch applied.  Just let me know how I can help in making this
possible.

Kind regards

       Andreas.

-- 
http://fam-tille.de




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 14:27:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dirk Eddelbuettel <edd@debian.org>:
Extra info received and forwarded to list. (Mon, 13 Feb 2012 14:27:14 GMT) Full text and rfc822 format available.

Message #35 received at 659163@bugs.debian.org (full text, mbox):

From: Dirk Eddelbuettel <edd@debian.org>
To: Andreas Tille <tille@debian.org>
Cc: Dirk Eddelbuettel <edd@debian.org>, 659163@bugs.debian.org
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 08:24:44 -0600
On 13 February 2012 at 15:05, Andreas Tille wrote:
| On Mon, Feb 13, 2012 at 07:33:06AM -0600, Dirk Eddelbuettel wrote:
| > Sorry, had a hectic week last week and didn't see this report til the weekend.
| 
| No problem.

Maybe there is one.  The regexp is a little 'tight' (ie [0-9]+ for all the
digit parts may be safter) and I am a little worried about our own Debian
transitions before a release.

| > Yes, it looks good.  
| > 
| > We will need to have package Build-Depends on "r-base-dev (>= 2.14.2)" as R
| > 2.14.2 comes out on Feb 29; we can test til then.  [ And yes, you can of
| > course also use thje precise minor release 2.14.1-2 this goes into... ]
| 
| Can't wait to test the new feature as soon as it hits unstable. :-)

:)
  
| BTW, would you also consider including the patch from #652456 either in
| the submitted form or as a separate script r-cran-quilt.mk which just
| has the patch applied.  Just let me know how I can help in making this
| possible.

r-cran-quilt.mk as an optional second script may make sense.

Dirk


-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx




Information forwarded to debian-bugs-dist@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 14:39:16 GMT) Full text and rfc822 format available.

Acknowledgement sent to Charles Plessy <plessy@debian.org>:
Extra info received and forwarded to list. Copy sent to Dirk Eddelbuettel <edd@debian.org>. (Mon, 13 Feb 2012 14:39:17 GMT) Full text and rfc822 format available.

Message #40 received at 659163@bugs.debian.org (full text, mbox):

From: Charles Plessy <plessy@debian.org>
To: 659163@bugs.debian.org
Cc: Andreas Tille <tille@debian.org>
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 23:37:02 +0900
Le Mon, Feb 13, 2012 at 07:51:20AM -0600, Dirk Eddelbuettel a écrit :
> 
> But I guess as your patch is written, with the "r-base-dev (>= $(shell ...)"
> we would be ok as we have
> 
>    2.14.0-1  (first release)     >=      2.14.0~201110xx-y  (rc release)

Dear Dirk,

On top of this, the patch produces a version number that ends with a tilde,
which is for dpkg a special character that sorts before the empty string.  So
we will always be safe with pre-releases:

$ dpkg --compare-versions 2.13.2-1 lt 2.14.0~ && echo true
true
$ dpkg --compare-versions 2.14.0~ lt 2.14.0~20111015-1 && echo true
true
$ dpkg --compare-versions 2.14.0~ lt 2.14.0 && echo true
true
$ dpkg --compare-versions 2.14.0~ lt 2.14.0-1 && echo true
true

Have a nice day,

-- 
Charles




Information forwarded to debian-bugs-dist@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 14:45:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
Extra info received and forwarded to list. Copy sent to Dirk Eddelbuettel <edd@debian.org>. (Mon, 13 Feb 2012 14:45:10 GMT) Full text and rfc822 format available.

Message #45 received at 659163@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: Dirk Eddelbuettel <edd@debian.org>
Cc: 659163@bugs.debian.org, Charles Plessy <charles@plessy.org>
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 15:42:25 +0100
Hi Dirk,

On Mon, Feb 13, 2012 at 07:51:20AM -0600, Dirk Eddelbuettel wrote:
> ...
> During this two-week period, I fear we may not have "buildability" as these
> versions would have identified (as R is concerned) as 2.14.0.  
> 
> But I guess as your patch is written, with the "r-base-dev (>= $(shell ...)"
> we would be ok as we have
> 
>    2.14.0-1  (first release)     >=      2.14.0~201110xx-y  (rc release)
> 
> so there would always have been a 2.14.0 ?

I see and I think you have a point here.

> I am trying to think of a past transition where this could have created a
> problem.  It may just work...
> 
> The alternative would be to have the R package create a versioning script
> (similar to r-cran.mk) that read the version from the Debian changelog (or
> directly from dpkg, apt, ...) for the Debian R package, rather than querying
> the R program:
> 
> edd@max:~$ dpkg -s r-base-dev | grep Version | perl -ne 'print / +([0-9]+\.[0-9]+\.[0-9]+)/'
> 2.14.1
> 
> or even
> 
> edd@max:~$ dpkg -s r-base-dev | grep Version | perl -ne 'print / +([0-9]+\.[0-9]+\.[0-9]+-[a-z0-9]+\b)/'
> 2.14.1-1oneiric
> 
> (on my Ubuntu box where I type this ?
> 
> We have to be very careful about the regexp.

Yes.  What about

   dpkg-parsechangelog | awk '/^Version/ { print $2 }'

or similarly

   dpkg-parsechangelog | grep '^Version:' | cut -f2 -d' '

or

   dpkg-parsechangelog | grep '^Version: ' | sed -e 's/^Version: //'

I found all these variants fullfilling the same purpose in our SVN.  I
would stay away from specifying a specific regexp if the more general
approach to detect the version in the changelog entry.

On the other hand I'm not fully sure (and so I CCed Charles who
originally invented this method) if there is really a need to specify a
>= (R-version)-(debversion) if debversion is > 1.  This would force a
rebuild of any r-cran-xyz package for any new r-base-dev package.  So
IMHO we could rather go with 

  (>= $(shell R --version | head -n1 | perl -ne 'print / +([0-9]\.[0-9]+\.[0-9])/')~)~0)
                                                                                     ^^
which would end up in

  (>= 2.14.0~0)

which is an expression lower than any of your prereleases.  I did NOT
YET tested this - just wondering whether you agree with my suggestion
to use the R release as base and make sure that *any* Debian version
of this R release should fit.

Kind regards

         Andreas.

-- 
http://fam-tille.de




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 15:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dirk Eddelbuettel <edd@debian.org>:
Extra info received and forwarded to list. (Mon, 13 Feb 2012 15:00:03 GMT) Full text and rfc822 format available.

Message #50 received at 659163@bugs.debian.org (full text, mbox):

From: Dirk Eddelbuettel <edd@debian.org>
To: Charles Plessy <plessy@debian.org>, 659163@bugs.debian.org
Cc: Andreas Tille <tille@debian.org>
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 08:56:55 -0600
On 13 February 2012 at 23:37, Charles Plessy wrote:
| On top of this, the patch produces a version number that ends with a tilde,
| which is for dpkg a special character that sorts before the empty string.  So
| we will always be safe with pre-releases:
| 
| $ dpkg --compare-versions 2.13.2-1 lt 2.14.0~ && echo true
| true
| $ dpkg --compare-versions 2.14.0~ lt 2.14.0~20111015-1 && echo true
| true
| $ dpkg --compare-versions 2.14.0~ lt 2.14.0 && echo true
| true
| $ dpkg --compare-versions 2.14.0~ lt 2.14.0-1 && echo true
| true

Nice one.  I had seen the tilde past the Perl part, but not thought it
through.  That's not bad. 

But read on.


On 13 February 2012 at 15:42, Andreas Tille wrote:
| Yes.  What about
| 
|    dpkg-parsechangelog | awk '/^Version/ { print $2 }'
| 
| or similarly
| 
|    dpkg-parsechangelog | grep '^Version:' | cut -f2 -d' '
| 
| or
| 
|    dpkg-parsechangelog | grep '^Version: ' | sed -e 's/^Version: //'

Well you have to pivot out from the debian/ of the current package to the
r-base(-dev) package, so something like

edd@max:~$ zcat /usr/share/doc/r-base-dev/changelog.Debian.gz | dpkg-parsechangelog -l- --count 1  | awk '/^Version/ {print $2}'
2.14.1-1oneiric0
edd@max:~$ 

would work.  And is /much/ more robust than the Perl regexp.

| I found all these variants fullfilling the same purpose in our SVN.  I
| would stay away from specifying a specific regexp if the more general
| approach to detect the version in the changelog entry.

Yep.
 
| On the other hand I'm not fully sure (and so I CCed Charles who
| originally invented this method) if there is really a need to specify a
| >= (R-version)-(debversion) if debversion is > 1.  This would force a
| rebuild of any r-cran-xyz package for any new r-base-dev package.  So
| IMHO we could rather go with 
| 
|   (>= $(shell R --version | head -n1 | perl -ne 'print / +([0-9]\.[0-9]+\.[0-9])/')~)~0)
|                                                                                      ^^
| which would end up in
| 
|   (>= 2.14.0~0)
| 
| which is an expression lower than any of your prereleases.  I did NOT
| YET tested this - just wondering whether you agree with my suggestion
| to use the R release as base and make sure that *any* Debian version
| of this R release should fit.

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.


Dirk

-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx




Information forwarded to debian-bugs-dist@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 15:00:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
Extra info received and forwarded to list. Copy sent to Dirk Eddelbuettel <edd@debian.org>. (Mon, 13 Feb 2012 15:00:05 GMT) Full text and rfc822 format available.

Message #55 received at 659163@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: Charles Plessy <plessy@debian.org>
Cc: 659163@bugs.debian.org
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 15:57:09 +0100
On Mon, Feb 13, 2012 at 11:37:02PM +0900, Charles Plessy wrote:
> Le Mon, Feb 13, 2012 at 07:51:20AM -0600, Dirk Eddelbuettel a écrit :
> > 
> > But I guess as your patch is written, with the "r-base-dev (>= $(shell ...)"
> > we would be ok as we have
> > 
> >    2.14.0-1  (first release)     >=      2.14.0~201110xx-y  (rc release)
> 
> Dear Dirk,
> 
> On top of this, the patch produces a version number that ends with a tilde,
> which is for dpkg a special character that sorts before the empty string.  So
> we will always be safe with pre-releases:
> 
> $ dpkg --compare-versions 2.13.2-1 lt 2.14.0~ && echo true
> true
> $ dpkg --compare-versions 2.14.0~ lt 2.14.0~20111015-1 && echo true
> true
> $ dpkg --compare-versions 2.14.0~ lt 2.14.0 && echo true
> true
> $ dpkg --compare-versions 2.14.0~ lt 2.14.0-1 && echo true
> true

Ahhh, I think I somehow reinvented Charles tilde trick in my previous
mail and now I for sure remember that you previousely told me about
exactly this.  So I think the original patch is safe against the
argument given by Dirk in his original response today (and just forget
about my solution which is not as good as Charles' original code).

Kind regards

      Andreas.

-- 
http://fam-tille.de




Information forwarded to debian-bugs-dist@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 15:21:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
Extra info received and forwarded to list. Copy sent to Dirk Eddelbuettel <edd@debian.org>. (Mon, 13 Feb 2012 15:21:08 GMT) Full text and rfc822 format available.

Message #60 received at 659163@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: Dirk Eddelbuettel <edd@debian.org>
Cc: Charles Plessy <plessy@debian.org>, 659163@bugs.debian.org
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 16:18:00 +0100
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




Information forwarded to debian-bugs-dist@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 15:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Charles Plessy <plessy@debian.org>:
Extra info received and forwarded to list. Copy sent to Dirk Eddelbuettel <edd@debian.org>. (Mon, 13 Feb 2012 15:30:03 GMT) Full text and rfc822 format available.

Message #65 received at 659163@bugs.debian.org (full text, mbox):

From: Charles Plessy <plessy@debian.org>
To: 659163@bugs.debian.org, Andreas Tille <tille@debian.org>
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Tue, 14 Feb 2012 00:26:59 +0900
Le Mon, Feb 13, 2012 at 08:56:55AM -0600, Dirk Eddelbuettel a écrit :
> 
> 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.

In that case:

$ echo "R:Depends=r-base-core (>= $(dpkg-query -W -f='${Version}' r-base-dev))" 
R:Depends=r-base-core (>= 2.14.1-1)

Cheers,

-- 
Charles




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 16:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dirk Eddelbuettel <edd@debian.org>:
Extra info received and forwarded to list. (Mon, 13 Feb 2012 16:00:03 GMT) Full text and rfc822 format available.

Message #70 received at 659163@bugs.debian.org (full text, mbox):

From: Dirk Eddelbuettel <edd@debian.org>
To: Charles Plessy <plessy@debian.org>, 659163@bugs.debian.org
Cc: Andreas Tille <tille@debian.org>
Subject: Re: Bug#659163: r-base-dev: Please enable using ${R:depends} substvar in r-cran.mk
Date: Mon, 13 Feb 2012 09:56:45 -0600
On 14 February 2012 at 00:26, Charles Plessy wrote:
| Le Mon, Feb 13, 2012 at 08:56:55AM -0600, Dirk Eddelbuettel a écrit :
| > 
| > 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.
| 
| In that case:
| 
| $ echo "R:Depends=r-base-core (>= $(dpkg-query -W -f='${Version}' r-base-dev))" 
| R:Depends=r-base-core (>= 2.14.1-1)

Yes, I like that best.  Simpler than my piping into dpkg-parsechangelog and awk.

Dirk

-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx




Information forwarded to debian-bugs-dist@lists.debian.org, Dirk Eddelbuettel <edd@debian.org>:
Bug#659163; Package r-base-dev. (Mon, 13 Feb 2012 21:06:51 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tille@debian.org>:
Extra info received and forwarded to list. Copy sent to Dirk Eddelbuettel <edd@debian.org>. (Mon, 13 Feb 2012 21:06:52 GMT) Full text and rfc822 format available.

Message #75 received at 659163@bugs.debian.org (full text, mbox):

From: Andreas Tille <tille@debian.org>
To: Dirk Eddelbuettel <edd@debian.org>
Cc: Charles Plessy <plessy@debian.org>, 659163@bugs.debian.org, 652456@bugs.debian.org
Subject: Re: Candidate file r-cran.mk
Date: Mon, 13 Feb 2012 22:04:37 +0100
On Mon, Feb 13, 2012 at 10:06:30AM -0600, Dirk Eddelbuettel wrote:
> 
> Ok, I have a candidate changelog entry
> 
> r-base (2.14.1-2) unstable; urgency=low
> 
>   * debian/r-cran.mk: Include simple-patchsys.mk only if quilt not used
>     as requested by Andreas Tille		 	(Closes: #652456)

Fine.
   
>   * debian/r-cran.mk: Support "R:Depends" expansion in debian/substvars
>     as requested by Andreas Tille and Charles Plessy	(Closes: #659163)				

The request was actually a bit different because Charles and me
suggested to base the constraint rather on the R upstream version than
the Debian package version because it adds an extra and at least from my
perspective unnecessary restriction to the Dependencies but from my
perspective it is acceptable and enables to use our existing
debian/control files unchanged.  Charles, am I right with this statement?

In any case I would like to know whether you found some flaw in the
arguing given by Charles to enable me understanding your reasons behind.

> based on the attached file.  I will put this into a pbuilder chroot later
> today and make a manual test or two or three.  If you could test packages
> using quilt as well I'd appreciate it.

I did two successful tests.

Kind regards and thanks for your work on R

       Andreas.

PS: What about maintaining R in a Vcs to simplify exchanging files like
    this by other means than mail?

-- 
http://fam-tille.de




Reply sent to Dirk Eddelbuettel <edd@debian.org>:
You have taken responsibility. (Wed, 22 Feb 2012 15:36:08 GMT) Full text and rfc822 format available.

Notification sent to Andreas Tille <tille@debian.org>:
Bug acknowledged by developer. (Wed, 22 Feb 2012 15:36:09 GMT) Full text and rfc822 format available.

Message #80 received at 659163-close@bugs.debian.org (full text, mbox):

From: Dirk Eddelbuettel <edd@debian.org>
To: 659163-close@bugs.debian.org
Subject: Bug#659163: fixed in r-base 2.14.2~20120222-1
Date: Wed, 22 Feb 2012 15:33:37 +0000
Source: r-base
Source-Version: 2.14.2~20120222-1

We believe that the bug you reported is fixed in the latest version of
r-base, which is due to be installed in the Debian FTP archive:

r-base-core-dbg_2.14.2~20120222-1_i386.deb
  to main/r/r-base/r-base-core-dbg_2.14.2~20120222-1_i386.deb
r-base-core_2.14.2~20120222-1_i386.deb
  to main/r/r-base/r-base-core_2.14.2~20120222-1_i386.deb
r-base-dev_2.14.2~20120222-1_all.deb
  to main/r/r-base/r-base-dev_2.14.2~20120222-1_all.deb
r-base-html_2.14.2~20120222-1_all.deb
  to main/r/r-base/r-base-html_2.14.2~20120222-1_all.deb
r-base_2.14.2~20120222-1.diff.gz
  to main/r/r-base/r-base_2.14.2~20120222-1.diff.gz
r-base_2.14.2~20120222-1.dsc
  to main/r/r-base/r-base_2.14.2~20120222-1.dsc
r-base_2.14.2~20120222-1_all.deb
  to main/r/r-base/r-base_2.14.2~20120222-1_all.deb
r-base_2.14.2~20120222.orig.tar.gz
  to main/r/r-base/r-base_2.14.2~20120222.orig.tar.gz
r-doc-html_2.14.2~20120222-1_all.deb
  to main/r/r-base/r-doc-html_2.14.2~20120222-1_all.deb
r-doc-info_2.14.2~20120222-1_all.deb
  to main/r/r-base/r-doc-info_2.14.2~20120222-1_all.deb
r-doc-pdf_2.14.2~20120222-1_all.deb
  to main/r/r-base/r-doc-pdf_2.14.2~20120222-1_all.deb
r-mathlib_2.14.2~20120222-1_i386.deb
  to main/r/r-base/r-mathlib_2.14.2~20120222-1_i386.deb
r-recommended_2.14.2~20120222-1_all.deb
  to main/r/r-base/r-recommended_2.14.2~20120222-1_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 659163@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dirk Eddelbuettel <edd@debian.org> (supplier of updated r-base package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


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

Format: 1.8
Date: Wed, 22 Feb 2012 08:51:46 -0600
Source: r-base
Binary: r-base r-base-core r-base-dev r-mathlib r-base-html r-doc-pdf r-doc-html r-doc-info r-recommended r-base-core-dbg
Architecture: source i386 all
Version: 2.14.2~20120222-1
Distribution: unstable
Urgency: low
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Changed-By: Dirk Eddelbuettel <edd@debian.org>
Description: 
 r-base     - GNU R statistical computation and graphics system
 r-base-core - GNU R core of statistical computation and graphics system
 r-base-core-dbg - GNU R debug symbols for statistical comp. language and environmen
 r-base-dev - GNU R installation of auxiliary GNU R packages
 r-base-html - GNU R html docs for statistical computing system functions
 r-doc-html - GNU R html manuals for statistical computing system
 r-doc-info - GNU R info manuals statistical computing system
 r-doc-pdf  - GNU R pdf manuals for statistical computing system
 r-mathlib  - GNU R standalone mathematics library
 r-recommended - GNU R collection of recommended packages [metapackage]
Closes: 652456 659163
Changes: 
 r-base (2.14.2~20120222-1) unstable; urgency=low
 .
   * Initial rc build (r58449) of R 2.14.2 expected for Feb 29
 .
   * R/m4, configure: Override bzip2 test for 1.0.6 to let our patched
     1.0.5 version pass as lintian does not like the embedded library
 .
   * debian/r-cran.mk: Include simple-patchsys.mk only if quilt not used
     as requested by Andreas Tille		 	(Closes: #652456)
 .
   * debian/r-cran.mk: Support "R:Depends" expansion in debian/substvars
     as requested by Andreas Tille and Charles Plessy	(Closes: #659163)
Checksums-Sha1: 
 41c551c43d3f5c634a9f1bc3d03debbfef7a0cde 2145 r-base_2.14.2~20120222-1.dsc
 1725912737f3ce041b207cb18431df894a7eba5c 23917901 r-base_2.14.2~20120222.orig.tar.gz
 a277879e714169f51a07becad97946b5ba2330f1 72166 r-base_2.14.2~20120222-1.diff.gz
 1c5ca4e6b1dc49a3864a2206a130d39fbc521695 20006030 r-base-core_2.14.2~20120222-1_i386.deb
 8b6ead295bec044f955cc7b42cf32f6d03c52d7a 622974 r-mathlib_2.14.2~20120222-1_i386.deb
 10ea9435d27d27bf2ed46251be1c2e91c9c4d944 2857644 r-base-core-dbg_2.14.2~20120222-1_i386.deb
 cda7368d7151a297cc47eb9ae939dcdcf450f195 35960 r-base_2.14.2~20120222-1_all.deb
 3d6de236fdda06489f50b348282bbba1e25dd6c7 3908 r-base-dev_2.14.2~20120222-1_all.deb
 6cda8f150e2808e196853b36334d13493552973a 88972 r-base-html_2.14.2~20120222-1_all.deb
 d7b18b4c4a414ec020e26f204c92539ecc2835cc 36008 r-doc-pdf_2.14.2~20120222-1_all.deb
 5f2ee5ea500614be1ac9b532eb81ff7391e5ef3c 632720 r-doc-html_2.14.2~20120222-1_all.deb
 0bf6afc75b6c3f19a17b2e095196795b3317b043 541984 r-doc-info_2.14.2~20120222-1_all.deb
 ed43b8b27a8ee802e1871d16e45a2a5c650151f0 2688 r-recommended_2.14.2~20120222-1_all.deb
Checksums-Sha256: 
 25b943b737525c3f1037a679acd8da743ea29809e5dda870e0959080534095e5 2145 r-base_2.14.2~20120222-1.dsc
 74bbff73c13ba760e2cb30b97d4aecf7af28d68f45734226af86149d12164a8d 23917901 r-base_2.14.2~20120222.orig.tar.gz
 340b9b727e7fca581f55fc8c7359b48b1fd4d9ab5fc6a991e29de1e02d7dda2f 72166 r-base_2.14.2~20120222-1.diff.gz
 6580a346b28f4abddf2a537f2fe917e5e064159daa1a07f88c49175a99164c28 20006030 r-base-core_2.14.2~20120222-1_i386.deb
 e25f07594c226c65904d2aa3e31ceb18e62269d18e71a57c527bf6afdc3deff0 622974 r-mathlib_2.14.2~20120222-1_i386.deb
 15261d777cf404f857fe42ab680774240a484d958c1de1ebd261b816f2b70525 2857644 r-base-core-dbg_2.14.2~20120222-1_i386.deb
 06374827237d4a5d25c82df3c6d50055a1353fe07d13f00174a1dad2a81c55fa 35960 r-base_2.14.2~20120222-1_all.deb
 f954855664c22c00ad363f637b1df315d1b1b83a9b0439b0d23a4e75cc3bbf0b 3908 r-base-dev_2.14.2~20120222-1_all.deb
 dcc2a44ce1ea0f9ec3eadaca8a285ce4d2d16e32eafb00d73dc639e90daa2c61 88972 r-base-html_2.14.2~20120222-1_all.deb
 124929c1eff49ee19d44b229a46dbcedcacd4395941a5261e25c2b2fed373c33 36008 r-doc-pdf_2.14.2~20120222-1_all.deb
 9dd32475d4dc238bd3c31da53585d7bfedc8d26e1b6dfdd2810e581678996e91 632720 r-doc-html_2.14.2~20120222-1_all.deb
 83c51a5eec9fa35dddc257c9aa6a263206e3b309b2e9141ca42af1654d83b193 541984 r-doc-info_2.14.2~20120222-1_all.deb
 821d5c8c7780f87b86062c31bdf27345737b43f7faa4ad06f724756b0123fded 2688 r-recommended_2.14.2~20120222-1_all.deb
Files: 
 257b345edd791f63b628fc5929a3c6eb 2145 gnu-r optional r-base_2.14.2~20120222-1.dsc
 099613fd69eb4fb8147264ab79be965e 23917901 gnu-r optional r-base_2.14.2~20120222.orig.tar.gz
 b9ac6f576326c8506138d517bd3b4260 72166 gnu-r optional r-base_2.14.2~20120222-1.diff.gz
 a5aae1b17a1c6a92f38f77dd246f1840 20006030 gnu-r optional r-base-core_2.14.2~20120222-1_i386.deb
 2fa05c487835a7e36d36493bc751e45a 622974 gnu-r optional r-mathlib_2.14.2~20120222-1_i386.deb
 6aff148dceedc416bd422d0679912d25 2857644 debug extra r-base-core-dbg_2.14.2~20120222-1_i386.deb
 3afe05f32f591e68067795ce1cc260f2 35960 gnu-r optional r-base_2.14.2~20120222-1_all.deb
 cd9b4b4aacd40438efbb5c3cd44f90ca 3908 gnu-r optional r-base-dev_2.14.2~20120222-1_all.deb
 8514f860771f763b32283e175e3a1839 88972 doc extra r-base-html_2.14.2~20120222-1_all.deb
 64036e92a85e1d03809eea14e88a911a 36008 doc optional r-doc-pdf_2.14.2~20120222-1_all.deb
 b14adec33a7fbf15481028d447bce687 632720 doc optional r-doc-html_2.14.2~20120222-1_all.deb
 0c3a50b964f17f4d9a4a783d634cfbef 541984 doc optional r-doc-info_2.14.2~20120222-1_all.deb
 c36983de9e94cc8a98621e20c2c187b5 2688 gnu-r optional r-recommended_2.14.2~20120222-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iD8DBQFPRQO3CZSR95Gw07cRAu4NAJ95NdmU9M7zectBspgGUu7h5Tf5qACeOnc3
ukPzTrAA6qkYXLdbGc9XDLk=
=k3G8
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 11 Apr 2012 07:43:45 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 06:34:15 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.