[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#849312: apt: dist-upgrade removes pkgs instead of upgrading them



On Sun, Dec 25, 2016 at 10:47:00AM +0100, Olaf van der Spek wrote:
> 2016-12-25 10:25 GMT+01:00 Julian Andres Klode <jak@debian.org>:
> >> # apt dist-upgrade
> >> The following packages will be REMOVED:
> >>   mariadb-server mariadb-server-10.0 mariadb-server-core-10.0
> >> 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
> >
> >> # apt install mariadb-server
> >> 1 upgraded, 7 newly installed, 4 to remove and 0 not upgraded.
> >
> > This one removes a package more (and in addition to that also does
> > other changes), so it really is worse solution than just removing
> > mariadb-server altogether.
> 
> That's not true right?
> I think we agree the proper solution being to upgrade mariadb from 10.0 to 10.1.
> Only removing packages is (I think always) worse then a no-op.

Removing 3 is strictly better than removing 4 packages through, so the
solution suggested by 'install' isn't better from an upgrade perspective
– its just better from a "I want that package installed, do whatever you
must" point of view.

The most sensible decision in the scenario would indeed be doing
nothing, which apt kinda tries to perform (you can kinda tell by
observing "0 not upgraded" even through the client stack would be,
so apt has performed a candidate version reset…).

The removes linger there from previous decisions which it doesn't
perform in the end as they conflicted with others. I guess we could
teach the problem resolver to look at each remove after it is done to
figure out if it is still needed much like the autoremover tries to deal
with no longer needed NEW packages.


I do think this specific instance is a rather temporary instance through
as mariadb was only recently repeatedly uploaded, so two versions are
still "fighting" over their spot in the archive.

In so far the /var/lib/dpkg/status file of the situation before the
dist-upgrade would be interesting – you might still have it in
/var/backups – as these solver things tend to be highly dependent on
mirror state and the specific packages installed on a machine.


> Can't it detect mariadb-server-10.1 being a proper upgrade of
> mariadb-server-10.0 and hence scoring this as neutral or positive?

In general no, because that isn't a positive upgrade: It involves the
removal of packages, which means features and services are removed other
programs (packaged or not) might use and/or the user does. The very way
this "upgrade" is packaged (= in another package forcibly removing the
old) indicates that this upgrade isn't free: Something will have to
adapt to changes – and changes are bad. Everyone hates changes: Ask all
users of $DESKTOP_ENVIRONMENT being upgraded to $DEKTOP_ENVORNMENT+1.
(The last bit is a bit exaggerated of course).

It is what it is: A few new packages and a few packages removed – that
you identify that as an upgrade is based on your knowledge of mariadb
and how it (incompatibly!) changes in each new version: For apt it looks
like the package 'default-texteditor' changed its depends from 'vim' to
'emacs' [actually worse than that as those two are co-installable] and
that isn't an upgrade! ;)


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature


Reply to: