Hi all,

Yesterday I invented dependency merging in APT which is now active in questing-proposed.

This changes APT to merge dependencies that intersect with one another into the intersection. This resolves issues with versioned provides and version range depends such as Bug #2111792 “solver pulls in gpgv-from-sq unexpectedly” : Bugs : apt package : Ubuntu.

This may have unexpected side-effects, please study

https://people.canonical.com/~jak/dependency-merges.questing.txt

Generated by https://people.canonical.com/~jak/find-dependency-merges.py

Points of concerns identified so far are:

  1. liblapack.so.3 and libblas.so.3 are both provided by single libopenblas0 packages, so they eliminate the individual packages.
    libhypre-2.32.0 Depends: liblapack3 | liblapack.so.3 overlaps Depends: libblas3 | libblas.so.3
     -  solutions:  ['libopenblas0-serial=0.3.29+ds-3', 'libopenblas0-pthread=0.3.29+ds-3', 'libopenblas0-openmp=0.3.29+ds-3', 'libatlas3-ba se=3.10.3-13ubuntu1']
     -  eliminated: ['liblapack3=3.12.1-2build1', 'liblapack3=3.12.1-2build1'] 
                    ['libblas3=3.12.1-2build1', 'libblis4-serial=1.1-2ubuntu1', 'libblis4-pthread=1.1-2ubuntu1', 'libblis4-openmp=1.1-2ubuntu1', 'libblas3=3.12.1-2build1']`
    
  2. The apport coredump handler switchery is a bit too magical:
    apport Depends: apport-core-dump-handler | systemd-coredump overlaps Depends: apport-core-dump-handler | python3-zstandard
     -  solutions:  ['apport-core-dump-handler=2.32.0-0ubuntu5', 'apport-core-dump-handler=2.28.1-0ubuntu4']
     -  eliminated: ['systemd-coredump=257.4-1ubuntu3'] ['python3-zstandard=0.23.0-4']
    

Particularly apport is trying to express the pattern apport-core-dump-handler | systemd-coredump, python3-zstandard if systemd-coredump

So this may require some further work and I’m happy to take your input into consideration.

On the other hand, there are additional benefits outside version ranges such as:

libtest2-harness-perl Depends: libjson-pp-perl overlaps Depends: perl:any
 -  solutions: ['perl=5.40.1-2ubuntu0.1', 'perl=5.40.1-3']
 -  eliminated: ['libjson-pp-perl=4.16000-2'] []

Where packages got merged into larger ones and now are obsolete and we pick the right one.

Please let me know your thoughts and ideas on how to further improve this.

1 Like

This has now been changed to only merge dependencies on the same package, producing only a handful of dependencies.

An updated file is available in

https://people.canonical.com/~jak/dependency-merges-3.questing.txt

1 Like