Package: devscripts
Version: 2.19.6
Severity: normal

As revealed by the new test in
<https://salsa.debian.org/debian/devscripts/merge_requests/141>:

Steps to reproduce:

* Have a .changes file containing a mixture of binary packages that are
  and are not already installed (let's say piuparts is already installed
  and piuparts-master is not)
* debi --with-depends --upgrade piuparts.changes

Expected result:

1. Packages that were already installed are upgraded (or downgraded or
   otherwise replaced), e.g. the old piuparts is replaced with the new
   piuparts
2. New dependencies of those packages are installed from the system's
   apt sources if necessary, e.g. if the new version of piuparts has gained
   Depends: uidmap or something, then uidmap will be installed
3. Packages that were not already installed are not installed, e.g. the
   new piuparts-master is not installed

Actual result:

1. As expected
2. As expected
3. Packages that were not already installed *are* installed,
   e.g. the new piuparts-master gets installed

Impact:

* For source packages where some binary packages are only meant to be
  installed on a minority of systems (e.g. piuparts-master,
  piuparts-slave, openarena-server, fai-nfsroot), maintainers who were
  relying on the previous behaviour of debi are likely to install
  unintended packages

There is an additional corner case here where (2.) and (3.) interact:
what is meant to happen if one of the packages that is to be upgraded
has a new dependency on a package that is not installed yet? For example:

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

I *think* the ideal result here is that `debi --with-depends --upgrade
foo.changes` results in upgrading foo, installing libfoo to satisfy the
dependency, but not installing foo-obscure?  But that might be difficult
to implement.

    smcv

Reply via email to