[Aptitude-devel] Bug#802532: aptitude: Missing comparison operators in "Unable to satisfy the build-depends" error message

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Sun Oct 25 22:52:07 UTC 2015


Control: tags -1 + pending


2015-10-25 17:22 To Axel Beckert:
>># aptitude build-dep gnudatalanguage
>>Unable to satisfy the build-depends: Build-Depends: libncurses-dev.
>>Unable to satisfy the build-depends: Build-Depends: libplplot-dev ( 5.10.0+dfsg-1~) | libplplot-dev ( 5.10).
>>Unable to satisfy the build-depends: Build-Depends: libncurses-dev.
>>Unable to satisfy the build-depends: Build-Depends: libplplot-dev ( 5.10.0+dfsg-1~) | libplplot-dev ( 5.10).
>>The following NEW packages will be installed:
>> chrpath libeigen3-dev libgraphicsmagick++1-dev libgraphicsmagick1-dev{a} libgsl0-dev
>>0 packages upgraded, 5 newly installed, 0 to remove and 2 not upgraded.
>>Need to get 3,185 kB of archives. After unpacking 20.2 MB will be used.
>>Do you want to continue? [Y/n/?]
>>[...]
>>libncurses-dev is btw. a virtual package while libplplot-dev isn't.
>>
>>So the reason for the error message about libncurses-dev is
>>https://bugs.debian.org/509100 (aptitude: build-dep fails when a
>>virtual package is needed), but the fact that there is even an error
>>message for libplplot-dev is maybe related to the fact that the
>>comparison operator is not shown.
>
>The problem of the operator not shown was only for printing, so it is
>not the direct cause for this.
>
>
>The dependency is a bit funny:
>
> libplplot-dev (>= 5.10.0+dfsg-1~) | libplplot-dev (<= 5.10)
>
>Maybe aptitude uses some wrong logic somewhere, gets a bit confused and
>thinks that no package can satisfy those.
>
>I very seldom use build-depends, but I never noticed a problem before,
>and there are not many bugs about the issue, so I guess that there is
>something specific about this dependency that makes it fail.

It was due to a typo causing a malfunction, also dating back to the date
when the feature was added (2008).

What it happened is that in the alternative:

  Unable to satisfy the build-depends: Build-Depends: libplplot-dev (>= 5.10.0+dfsg-1~) | libplplot-dev (<= 5.10).

...the package to satisfy the dependency was always compared with the
operator and version of the last alternative.  So it was trying to match
libplot-dev <= 5.10 twice, and failing because the version of the
available libplplot-dev package is 5.10.0+dfsg2-0.1.

Since the requirements much more often do not include versions or only
do ">=", or when ">=" and "<=" are arranged in other ways and they were
not incompatible, it was working most of the time.

Alternatives don't always involve the same packages and versions, and I
think that even funkier effects could happen if the alternative packages
and their versions were different and the combination allowed to install
one due to version comparison with the other.

But in any case, it is strange that this survived lurking for so many
years (7+) since the feature was added, without more bug reports
alerting about the problem.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list