Bug#944190: release.debian.org: Allow britney to consider installability of dependencies of essential packages
(too old to reply)
Mark Hindley
2019-11-05 16:20:02 UTC
Package: release.debian.org
Severity: normal
User: ***@packages.debian.org
Usertags: britney
Tags: patch

Dear Release Team,

Whilst investigating why britney has not migrated src:elogind 241.3-1+debian1 to
bullseye, I discovered that the negative dependencies of the dependencies of
essential packages (Priority: required) are not actually tested for

The current implementation considers libsystemd0 as essential (by being a
dependency of apt, bsdutils et al.) and excludes libelogind0 from installability
testing as it is not co-installable with libsystemd0.

This behaviour is unchanged since the original version of the python
implementation of the installability tester[2] although it has been
reworked[3]. It appears to be a short-circuit bail out to avoid unnecessary
testing of packages that can't succeed. However, it precludes the consideration
of packages which might satisfy a dependency of an essential package through a

The attached patch restricts the list of packages for which installability
testing is skipped just to packages which are not co-installable with any
Priority: required package. All other packages are tested normally for

The effect of this patch is that britney now successfully discovers that
libelogind0 can satisfy all the necessary dependencies and can migrate along
with the rest of src:elogind. The diff of HeidiResult with and without this
patch is also attached.

I think that my analysis is correct, particularly in respect of the original
intention of the handling of ess_never in _check_inst(). However, if I have
misunderstood the reasoning behind this or there are other unintended
consequences of the patch that I have not seen or envisaged, I am very happy to
work with you on a more suitable solution.



[1] https://salsa.debian.org/release-team/britney2/blob/master/britney2/installability/tester.py#L239
[2] https://salsa.debian.org/release-team/britney2/commit/7051d5b0e968936ebbd8a93040e9a2cbe9d3a7e1
[3] https://salsa.debian.org/release-team/britney2/commit/530db5d3f77da479078316aab3fee2389d58d172

-- System Information:
Debian Release: 8.11
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-10-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Mark Hindley
2019-11-08 12:00:01 UTC
Hi Mark
Thanks for the investigative work and the patch.
I have not had time to review the patch yet in details and hope to have
a look this weekend.
Could I convince you to add a small test case for this problem to our
britney2-tests repo (https://salsa.debian.org/debian/britney2-tests)
that fails with the current master but succeeds with your patch? This
would ensure we do not inadvertently regress on this area when
refactoring code.
I will happily look at that. I am busy until Sunday, but will look at it

Many thanks.

Mark Hindley
2019-11-10 17:40:02 UTC
I looking forward to your test case as it will make this issue a lot
easier to debug.
A test case is attached. It fails without the patch I submitted (inadequate
though it is, as you pointed out), but succeeds with it. I hope it is helpful
and I have not missed something.
* Britney "should" rewrite the relation on "libsystemd0" as
"libsystemd0 | libelogin0" when building the BinaryPackageUniverse
(actually as libsystemd0/<version>/arch | libsystemd0/<version>/arch
- This is also based on the assumption that the Conflicts/Provides
setup in libelogin0 is done correctly. I /think/ it is - I am just
being explicit about the assumption.
I think so too. Certainly the binaries from src:elogind are manually installable
into bullseye and satisfy the necessary dependencies of essential packages.

Thanks very much for looking at this.

Let me know if there is anything else I can do to help.

Mark Hindley
2019-11-11 11:30:01 UTC

Thanks for working on this so swiftly.
I have attached the following patch that passes the provided test and
(AFAICT) does what we want. Please feel free to review it; I will come
back to this in a few days.
I have tried your patch. In my testing it fixes both the new test case and also
allows elogind migration when feeding britney2 with real world data from current
sid and bullseye.

Thanks very much.