Control: retitle 932640 debi: regression in 2.19.6: won't install new package 
without --with-depends

On Mon, 22 Jul 2019 at 08:30:49 +0100, Simon McVittie wrote:
> On Sun, 21 Jul 2019 at 11:33:20 -0300, Joao Eriberto Mota Filho wrote:
> > After upgrading to devscripts 2.19.6 in Sid, debi command does nothing and
> > remains in wait state.
> > 
> >   # LANG=C debi
> >   Reading package lists... Donevcard/2vcard#
> >   Building dependency tree
> >   Reading state information... Done
> >   Note, selecting '2vcard' instead of './2vcard_0.6-2_all.deb'
> >   Skipping 2vcard, it is not installed and only upgrades are requested.
> >   0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 
> I can't tell whether the issue you're having would be fixed by one of the
> above or whether it's a third regression.

I think this is a separate regression. Workaround: use debi --with-depends
for now (maybe that option should become the default).

Before !45 was merged, in 2.19.5, we had:

              |    --with-depends          |   not --with-depends     |
--------------|----------------------------|--------------------------|
--upgrade     | debpkg -O --unpack *.deb;  | debpkg -O --unpack *.deb |
              | apt-get -f install         |                          |
--------------|----------------------------|--------------------------|
not --upgrade | debpkg --unpack *.deb;     | debpkg --unpack *.deb    |
              | apt-get -f install         |                          |
--------------|----------------------------|--------------------------|

This means --upgrade controlled whether new packages from the source
package on the debi command-line were to be installed (--upgrade => no,
not --upgrade => yes), and --with-depends controlled whether apt-get
was to be used to install new dependencies afterwards.

In 2.19.6, after !45, we have this instead (you'll notice the two rows
are the same, so --upgrade is effectively ignored):

              |    --with-depends          |   not --with-depends     |
--------------|----------------------------|--------------------------|
--upgrade     | apt-get install *.changes  | apt-get install \        |
              |                            | --only-upgrade *.changes |
--------------|----------------------------|--------------------------|
not --upgrade | apt-get install *.changes  | apt-get install \        |
              |                            | --only-upgrade *.changes |
--------------|----------------------------|--------------------------|

This means that if you don't already have 2vcard installed, debi
won't install it, because it runs `apt-get install --only-upgrade
2vcard.changes`, instructing apt to only upgrade existing packages and
not install new packages. In effect, the new `debi --with-depends`
is the equivalent of the old `debi --with-depends`, the new
`debi` (without --with-depends) is the equivalent of the old
`debi --upgrade`, and there is now no equivalent of the old
`debi --with-depends --upgrade` or plain `debi`.

I'm not sure what the best solution to this is: it's difficult to get
the equivalent of the old behaviour in a single apt invocation. It
might be necessary to use `dpkg-query -W` to learn which packages are
installed right now, and then craft a suitable apt command-line to
(try to) install only the chosen binary packages.

The --upgrade option is most important if you are dealing with a source
package that builds non-co-installable binary packages, like this:

Package: foo-full
Provides: foo
Conflicts: foo
Replaces: foo

Package: foo-minimal
Provides: foo
Conflicts: foo
Replaces: foo

"foo-full" is installed

"debi --upgrade foo_1.2-3.changes" needs to install foo-full_1.2-3 and not
attempt to install foo-minimal

... so any solution to --upgrade needs to handle that situation.

    smcv

Reply via email to