Could not calculate upgrade should suggest log location
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
Medium
|
Brian Murray | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Test Case
---------
1) add this PPA to your system 'sudo add-apt-repository ppa:oibaf/
2) run 'sudo apt-get update; sudo apt-get dist-upgrade'
3) try to upgrade to Cosmic
4) Observe the following message:
"Could not calculate the upgrade
An unresolvable problem occurred while calculating the upgrade.
This can be caused by:
* Upgrading to a pre-release version of Ubuntu
* Running the current pre-release version of Ubuntu
* Unofficial software packages not provided by Ubuntu
If none of this applies, then please report this bug using the
command 'ubuntu-bug ubuntu-
With the version of the package from -proposed you should instead see the following in the error message:
"If none of this applies, then please report this bug using the
command 'ubuntu-bug ubuntu-
you want to investigate this yourself the log files in
'/var/log/
Specifically, look at 'main.log' and 'apt.log'."
Regression Potential
-------
This change does end up breaking translations but the message is much more informative and lots of users have difficulty upgrading between releases which can leave them on an insecure (EoL) release of Ubuntu which is worse.
Situation
===============
As more-or-less usual, my attempt to upgrade from 16.04 to 18.04 failed with "Could not calculate upgrade" error (well, one even more confusing and less google-able, as translated to my national language). Also, as usual, I found myself confused, without any pointers what to do next. I tried a few times, tried googling, to no success.
It took me switching to LANG=C (to see more googlish error messages) and about 20 minutes of scanning various forums until I found suggestion to check /var/log/
There I found some rather cryptic remark about unresolvable cyclic dependency which may be caused by held packages, which nevertheless inspired me to look for a way to find held packages.
A few more minutes of googling and I found out about
apt-mark showhold
which nicely listed my few held packages (nvidia-304 and some related, IIRC results of driver problems I resolved 2 years ago).
I removed those packages and now my upgrade is progressing. But whole experience was very unpleasant.
Suggested changes (tiny changes but with large impact)
=======
1. Whenever do-release-upgrade fails, it should suggest checking out /var/log/
Simply, instead of finishing with
"Could not calculate the upgrade.
Unresolvable error happened."
finish with
"Could not calculate the upgrade.
Unresolvable error happened.
Technical logs of failed upgrade can be found in /var/log/
This very sentence would save me at least 2 hours.
2. In case upgrade calculation fails due to held or unofficial packages, either list problematic
packages, or suggest commands which will list them. For example, my very case would be resolved
in a minute if installer printed something like:
Note: upgrade calculation could be caused by held packages:
(consider removing those packages temporarily to resolve the problem)
or
Note: upgrade calculation could be caused by held packages
(use apt-mark showhold to list such packages on your system, and
consider removing them temporarily to resolve the problem)
Related branches
- Ubuntu Core Development Team: Pending requested
-
Diff: 474 lines (+120/-30)6 files modifiedDistUpgrade/DistUpgradeCache.py (+19/-7)
DistUpgrade/DistUpgradeController.py (+25/-5)
DistUpgrade/DistUpgradeFetcherCore.py (+1/-1)
debian/changelog (+14/-2)
do-release-upgrade (+12/-0)
tests/test_sources_list.py (+49/-15)
description: | updated |
Changed in ubuntu-release-upgrader (Ubuntu): | |
status: | New → Triaged |
tags: | added: rls-cc-incoming |
tags: |
added: rls-dd-incoming removed: rls-cc-incoming |
tags: | added: id-5b5b2ceb30bee3278544fe94 |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done verification-done-cosmic removed: verification-needed verification-needed-cosmic |
Out of curiosity: what those rls-cc and rls-dd mean? Do you agree with my suggestions, or reject them, or … ?
(Google points me towards various launchpad errors with similar redirections and pages about RLS - „restless leg syndrome”…)