[Pkg-samba-maint] APT dependency resolver: Missing python3-ldb Breaks: libldb2 ?

Philipp Hahn pmhahn at pmhahn.de
Mon Jul 25 16:04:01 BST 2022


Hello,

I'm a DD myself, but employed by Univention GmbH. As such these are NOT 
Debian packages, but our own builds. Nevertheless I want to understand 
the underlying issue as I have seen it multiple times by now - even in 
Debian.


Today I observed some APT behavior, which I was unable to explain at 
first, but after some research make sense:

- System has old package versions installed:
> libldb2:amd64   2:2.5.1-1
> python3-ldb     2:2.5.1-1

- `apt-get install …` is used to install additional packages. Indirectly 
they require newer version of
>  ...: Depends: libldb2 (>= 2:2.5.2-1)

- This aborts refusing to upgrade `python3-ldb`, which declares
> python3-ldb: Depends: libldb2 (= ${binary:Version})

- What I thinks is missing is some
> libldb2: Breaks: python3-ldb (<< ${binary:Version})


# More details

This is from running the following command:

> LC_ALL=C apt-get install \
>   -s \
>   -o Debug::pkgDepCache::Marker=yes \
>   -o Debug::pkgDepCache::AutoInstall=yes \
>   -o Debug::pkgProblemResolver=yes \
>   -o Debug::pkgProblemResolver::ShowScores=yes \
>   univention-s4-connector 2>&1 | less

which show this:

> Show Scores
> 10000 univention-s4-connector:amd64 < none -> 14.0.10-2 @un puN >
> ...
> 35 python3-ldb:amd64 < 2:2.5.1-1 | 2:2.5.2-1 @ii umH >
> ...
> 30 libldb2:amd64 < 2:2.5.1-1 | 2:2.5.2-1 @ii umH >
> ...
> 8 samba-dsdb-modules:amd64 < 2:4.16.2-1 -> 2:4.16.2-1 @ii umU Ib >


> Starting 2 pkgProblemResolver with broken count: 1
> Investigating (0) samba-dsdb-modules:amd64 < 2:4.16.2-1 -> 2:4.16.2-1 @ii umU Ib >
> Broken samba-dsdb-modules:amd64 Depends on libldb2:amd64 < 2:2.5.1-1 | 2:2.5.2-1 @ii umH > (> 2:2.5.2~)
>   Considering libldb2:amd64 30 as a solution to samba-dsdb-modules:amd64 8
>   MarkKeep samba-dsdb-modules:amd64 < 2:4.16.2-1 -> 2:4.16.2-1 @ii umU Ib > FU=0
>   Re-Instated libldb2:amd64
>   Re-Instated samba-dsdb-modules:amd64
> Investigating (1) python3-ldb:amd64 < 2:2.5.1-1 | 2:2.5.2-1 @ii umH Ib >
> Broken python3-ldb:amd64 Depends on libldb2:amd64 < 2:2.5.1-1 -> 2:2.5.2-1 @ii umU > (= 2:2.5.1-1)
>   Considering libldb2:amd64 30 as a solution to python3-ldb:amd64 35

I thinks it is here the APT decides to prioritize `python3-ldb` over 
`libldb2` and prefers to not update both packages.

>   Added libldb2:amd64 to the remove list
>   Fixing python3-ldb:amd64 via keep of libldb2:amd64
>   MarkKeep libldb2:amd64 < 2:2.5.1-1A~5.0.0.202206171844 -> 2:2.5.2-1 @ii umU > FU=0

Is this a generic problem, which happens, when an upgrade is requested 
to a lower-level library such as `libldb2`, but not the higher-level 
package such as `python3-ldb`, when there is a same version dependency 
between them?
> python3-ldb: Depends: libldb2 (= ${binary:Version})

What is the correct fix? Add this?
> libldb2: Breaks: python3-ldb (<< ${binary:Version})


LDB is here: 
<https://salsa.debian.org/samba-team/ldb/-/blob/master/debian/control#L40-L42>


You can find even more details in my blog post at
<https://pmhahn.github.io/apt-dependency-resolver/>

Thanks in advance
Philipp



More information about the Pkg-samba-maint mailing list