[Buildd-tools-devel] Bug#395271: sbuild: incorrectly handles versioned provides

Niko Tyni ntyni at debian.org
Sun Feb 24 19:49:26 UTC 2008


tag 395271 patch
thanks

On Tue, Jun 05, 2007 at 08:39:41AM +0200, Lucas Nussbaum wrote:
> On 26/05/07 at 08:58 +0300, Guillem Jover wrote:
> > reassign 395271 sbuild
> > retitle 395271 sbuild: incorrectly handles versioned provides
> > thanks

> I think that the correct way to handle that on sbuild side is to install
> the specified package even if the package is provided by another
> package, in the case it's a versioned depend. So that would give
> something like:
> libfile-temp-perl: provided by an installed package, but versioned dependancy => missing
> 
> I have the same problem with lots of packages that b-dep on
> linux-kernel-headers (>> 2.5.999), since I switched to linux-libc-dev,
> and linux-kernel-headers is provided by linux-libc-dev.
>  
> How hard would that be to implement something like that ?

Looking at the sbuild code, provided packages are just marked installed
with the magic version "=*=PROVIDED=*=", which compares as greater than
just about anything else (except versions with an epoch, of course.)

Just prepending a tilde to the magic version to make it sort
before anything else seems to fix this bug.  I just tried with
libclass-trait-perl, and the result is exactly what was hoped for.

Without the change:

Build-Depends-Indep: perl (>= 5.8.0-7), libtest-differences-perl (>= 0.47), libmodule-build-perl, libtest-simple-perl (>= 0.62)
[...]
libtest-simple-perl: already installed (=*=PROVIDED=*= >= 0.62 is satisfied)
[...]
dpkg-checkbuilddeps: Unmet build dependencies: libtest-simple-perl (>= 0.62)
dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting.

With the change:

libtest-simple-perl: non-matching version installed (~*=PROVIDED=*= ! >= 0.62)
Using default version 0.62-1
[...]
The following NEW packages will be installed:
  bsdmainutils debhelper file gettext gettext-base groff-base html2text
  intltool-debian libalgorithm-diff-perl libgomp1 libmagic1
  libtest-differences-perl libtest-simple-perl libtext-diff-perl man-db
  po-debconf

and the package builds succesfully.

Please consider the attached trivial patch.

Cheers,
-- 
Niko Tyni   ntyni at debian.org





More information about the Buildd-tools-devel mailing list