On Sun, 4 Sep 2011 08:16:48 +0200 Lucas Nussbaum wrote:

> On 04/09/11 at 00:54 +0200, Francesco Poli wrote:
[...]
> > Good, if what I discovered doesn't change the conclusion, I'll keep the
> > versioned dependency.
> 
> Please do.

OK, thanks for confirming that it is recommendable.

> 
> If you want to facilitate backports, maybe use something like:
> ruby-cmdparse2 (>= X) | libcmdparse2-ruby (>= X)

I've just tried out this strategy: it works, but it has an important
drawback.

Let me explain.

The current (sid) version of apt-listbugs is 0.1.5 : it depends on
libxml-parser-ruby1.8 and on libhttpclient-ruby1.8 (>= 2.1.5.2-1) .
Let's call apt-listbugs/0.1.6~rc1 the modified version which depends on
ruby-xmlparser and on ruby-httpclient (>= 2.1.5.2-1) .
Let's call apt-listbugs/0.1.6~rc2 the modified version which depends on
ruby-xmlparser | libxml-parser-ruby1.8 and on
ruby-httpclient (>= 2.1.5.2-1) | libhttpclient-ruby1.8 (>= 2.1.5.2-1) .

Everything seems to work fine when installing apt-listbugs/0.1.6~rc1 or
apt-listbugs/0.1.6~rc2 from scratch.

But if I try to upgrade from apt-listbugs/0.1.5 to
apt-listbugs/0.1.6~rc2 the transitional packages are not automatically
removed (not even when no other package depends on or recommends them),
since they are still satisfying a dependency.
On the other hand, if I try to upgrade from apt-listbugs/0.1.5 to
apt-listbugs/0.1.6~rc1, aptitude automatically removes the two
transitional packages (as long as no other package depends on or
recommends them), thus leaving users' systems in a cleaner state.

Hence, I think it is better to convert

  Depends: libfoo-ruby1.8, libbar-ruby1.8 (>= X)

into

  Depends: ruby-foo, ruby-bar (>= X)

rather than using the alternative dependency trick.

I hope my input may be useful.


-- 
 http://www.inventati.org/frx/frx-gpg-key-transition-2010.txt
 New GnuPG key, see the transition document!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

Attachment: pgpN4zJqHjfAd.pgp
Description: PGP signature

Reply via email to