debi: Let --upgrade install new dependencies from the same source (corner case from #932963)

(This branch includes and requires !143 (merged).)

Suppose we have this situation:

  • old packages:
    • foo: installed
    • foo-obscure: not installed
  • new packages:
    • foo: Depends: libfoo
    • foo-obscure: Depends: libfoo
    • libfoo

and we install the new packages with debi --upgrade --with-depends foo.changes. It isn't completely obvious what should happen, but I think the right answer is that we upgrade to the new foo (because it was already installed) and install libfoo (despite --upgrade, because --with-depends told us to satisfy dependencies and the new foo now depends on it), but we still do not install foo-obscure (because --upgrade told us not to).

This is consistent with the behaviour of apt install --only-upgrade foo foo-obscure, which would also upgrade foo and install the dependency libfoo but not install foo-obscure.

Recent (>= stretch) apt versions can be told to satisfy dependencies from a .changes file without necessarily installing every package from that .changes file, by using --with-source.

Edited by Simon McVittie

Merge request reports

Loading