automatic dependency generation for ${source:Next-Upstream-Version}

2012-01-28 Thread Joachim Reichel
Hi,

(see #657720 for the background details and rationale)

to one of my binary packages I want to add a dependency like
Depends: foo (= ${source:Upstream-Version}), foo (
${source:Next-Upstream-Version})

The question: how to achieve that given that
${source:Next-Upstream-Version} does not exist (and is not trivial to
compute in general)? I want to avoid hard-coding the next upstream
version because then the package is uninstallable whenever a new
upstream version of foo is uploaded (which is not bad in this specific
context, but it requires a sourceful change for the next upload).

I suppose foo (= ${source:Upstream-Version}) does not work because it
will never match for non-native packages, right? Is there something like
foo (upstream version of foo = ${source:Upstream-Version})

I guess this can be implemented using debian/substvars. But I don't want
to reinvent the wheel. I'm probably not the first one with this problem.
Are there any examples how to do that easily?

Joachim


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f243f8e.2040...@gmx.de



Re: automatic dependency generation for ${source:Next-Upstream-Version}

2012-01-28 Thread Alessio Treglia
On Sat, Jan 28, 2012 at 7:33 PM, Joachim Reichel joachim.reic...@gmx.de wrote:
 to one of my binary packages I want to add a dependency like
 Depends: foo (= ${source:Upstream-Version}), foo (
 ${source:Next-Upstream-Version})

I usually rely on:

 package ( ${source:Upstream-Version}+1~),
 package (= ${source:Version}),

Cheers.

-- 
Alessio Treglia          | www.alessiotreglia.com
Debian Developer         | ales...@debian.org
Ubuntu Core Developer    | quadris...@ubuntu.com
0416 0004 A827 6E40 BB98 90FB E8A4 8AE5 311D 765A


--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/camhuwownnaxeddq1tmetudxyavbuhbzckba03f7c5dq4rfo...@mail.gmail.com



Re: automatic dependency generation for ${source:Next-Upstream-Version}

2012-01-28 Thread Joachim Reichel
Hi,

On 01/28/2012 08:03 PM, Alessio Treglia wrote:
 On Sat, Jan 28, 2012 at 7:33 PM, Joachim Reichel joachim.reic...@gmx.de 
 wrote:
 to one of my binary packages I want to add a dependency like
 Depends: foo (= ${source:Upstream-Version}), foo (
 ${source:Next-Upstream-Version})
 
 I usually rely on:
 
  package ( ${source:Upstream-Version}+1~),
  package (= ${source:Version}),

after sending the mail I was thinking about

package ( ${source:Upstream-Version}.1)

But + is better than . because it sorts before . (actually + is the
lexicographically smallest character allowed in upstream versions, see
policy 5.6.12).

I wonder about the 1~ though. Isn't

package ( ${source:Upstream-Version}+)

sufficient (and tighter)? (though it looks a bit weird)

(It's not sufficient if upstream adds a ~, but that's probably
unlikely, and I don't see a way to handle that case.)

Joachim


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f245062.2060...@gmx.de