TypeError: _fetch_archives() missing 1 required positional argument: 'allow_unauthenticated'

Bug #1860606 reported by Zygmunt Krynicki on 2020-01-22
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
High
Julian Andres Klode
Xenial
High
Marc Deslauriers
Bionic
High
Marc Deslauriers
Disco
High
Marc Deslauriers
Eoan
High
Marc Deslauriers
Focal
High
Julian Andres Klode

Bug Description

I was upgrading my workstation from 19.04 to 19.10 and following that to 20.04. In each case I used do-release-upgrade (without and with -d respectively). The 20.04 upgrade failed as the tool crashed on invalid function signature:

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-f_816ncr/focal", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-f_816ncr/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-f_816ncr/DistUpgrade/DistUpgradeController.py", line 2082, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-f_816ncr/DistUpgrade/DistUpgradeController.py", line 1998, in fullUpgrade
    if not self.doDistUpgradeFetching():
  File "/tmp/ubuntu-release-upgrader-f_816ncr/DistUpgrade/DistUpgradeController.py", line 1233, in doDistUpgradeFetching
    self.cache._fetch_archives(self.fetcher, pm)
TypeError: _fetch_archives() missing 1 required positional argument: 'allow_unauthenticated'

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Israel G. Lugo (ilugo) wrote :

Same here. Ran "pkexec do-release-upgrade -m desktop -f DistUpgradeViewKDE" and this crashed after a short time, with the above exception in /var/log/dist-upgrade

Annoyingly, the tool had already made sufficient changes (to the sources.dist?), so re-running the upgrade, even from the command line (sudo do-release-upgrade -m desktop) resulted in an error saying I had packages to upgrade. Which of course I did, thousands of them.

I ran apt full-upgrade and now I can run "sudo do-release-upgrade -m desktop". But it only says no upgrades found. So I have no idea whether any further action needs to be taken or not.

How can I resume the upgrade, or manually do whatever clean ups are necessary now that the packages are upgraded???

Changed in ubuntu-release-upgrader (Ubuntu Xenial):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu Disco):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu Eoan):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu Xenial):
importance: Undecided → High
Changed in ubuntu-release-upgrader (Ubuntu Bionic):
importance: Undecided → High
Changed in ubuntu-release-upgrader (Ubuntu Disco):
importance: Undecided → High
Changed in ubuntu-release-upgrader (Ubuntu Eoan):
importance: Undecided → High
Changed in ubuntu-release-upgrader (Ubuntu Focal):
importance: Undecided → High
Changed in python-apt (Ubuntu Xenial):
assignee: nobody → Marc Deslauriers (mdeslaur)
importance: Undecided → High
status: New → Confirmed
Changed in python-apt (Ubuntu Bionic):
assignee: nobody → Marc Deslauriers (mdeslaur)
importance: Undecided → High
status: New → Confirmed
Changed in python-apt (Ubuntu Disco):
assignee: nobody → Marc Deslauriers (mdeslaur)
importance: Undecided → High
status: New → Confirmed
Changed in python-apt (Ubuntu Eoan):
assignee: nobody → Marc Deslauriers (mdeslaur)
importance: Undecided → High
status: New → Confirmed
Changed in python-apt (Ubuntu Focal):
assignee: nobody → Julian Andres Klode (juliank)
importance: Undecided → High
status: New → Confirmed
Pierre-Emmanuel Novac (piernov) wrote :

sudo mv /etc/apt/sources.list.distUpgrade /etc/apt/sources.list
sudo apt update
sudo apt install python3-apt=1.8.4
sudo do-release-upgrade

That gets it going for Lubuntu 19.04 to 19.10 upgrade.

jfp (ubuntujfp) wrote :

That does not work because it now wants to upgrade python3-apt. (For Kubuntu)

# apt install python3-apt=1.8.4

# do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

# apt upgrade
The following packages will be upgraded:
  python3-apt

Pierre-Emmanuel Novac (piernov) wrote :

Sorry forgot that I commented out the updates and security repositories in /etc/apt/sources.list . You can probably hold the python3-apt package to get the same effect.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 1.1.0~beta1ubuntu0.16.04.8

---------------
python-apt (1.1.0~beta1ubuntu0.16.04.8) xenial-security; urgency=medium

  * SECURITY REGRESSION: crash with ubuntu-release-upgrader (LP: #1860606)
    - apt/cache.py: make allow_unauthenticated argument to
      fetch_archives() optional.

 -- Marc Deslauriers <email address hidden> Wed, 22 Jan 2020 16:53:47 -0500

Changed in python-apt (Ubuntu Xenial):
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 1.8.5~ubuntu0.3

---------------
python-apt (1.8.5~ubuntu0.3) disco-security; urgency=medium

  * SECURITY REGRESSION: crash with ubuntu-release-upgrader (LP: #1860606)
    - apt/cache.py: make allow_unauthenticated argument to
      fetch_archives() optional.

 -- Marc Deslauriers <email address hidden> Wed, 22 Jan 2020 16:51:48 -0500

Changed in python-apt (Ubuntu Disco):
status: Confirmed → Fix Released
Changed in ubuntu-release-upgrader (Ubuntu Xenial):
status: Confirmed → Invalid
Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: Confirmed → Invalid
Changed in ubuntu-release-upgrader (Ubuntu Disco):
status: Confirmed → Invalid
Changed in ubuntu-release-upgrader (Ubuntu Eoan):
status: Confirmed → Invalid
Changed in ubuntu-release-upgrader (Ubuntu Focal):
status: Confirmed → Invalid
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 1.9.0ubuntu1.3

---------------
python-apt (1.9.0ubuntu1.3) eoan-security; urgency=medium

  * SECURITY REGRESSION: crash with ubuntu-release-upgrader (LP: #1860606)
    - apt/cache.py: make allow_unauthenticated argument to
      fetch_archives() optional.

 -- Marc Deslauriers <email address hidden> Wed, 22 Jan 2020 16:47:49 -0500

Changed in python-apt (Ubuntu Eoan):
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 1.6.5ubuntu0.2

---------------
python-apt (1.6.5ubuntu0.2) bionic-security; urgency=medium

  * SECURITY REGRESSION: crash with ubuntu-release-upgrader (LP: #1860606)
    - apt/cache.py: make allow_unauthenticated argument to
      fetch_archives() optional.

 -- Marc Deslauriers <email address hidden> Wed, 22 Jan 2020 16:52:51 -0500

Changed in python-apt (Ubuntu Bionic):
status: Confirmed → Fix Released
Mathew Hodson (mhodson) on 2020-01-24
no longer affects: ubuntu-release-upgrader (Ubuntu)
no longer affects: ubuntu-release-upgrader (Ubuntu Xenial)
no longer affects: ubuntu-release-upgrader (Ubuntu Bionic)
no longer affects: ubuntu-release-upgrader (Ubuntu Disco)
no longer affects: ubuntu-release-upgrader (Ubuntu Eoan)
no longer affects: ubuntu-release-upgrader (Ubuntu Focal)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 1.9.5

---------------
python-apt (1.9.5) experimental; urgency=medium

  [ Marc Deslauriers ]
  * SECURITY REGRESSION: crash with ubuntu-release-upgrader (LP: #1860606)
    - apt/cache.py: make allow_unauthenticated argument to
      fetch_archives() optional.

  [ Julian Andres Klode ]
  * Really bump aptdaemon break (to 1.1.1+bzr982-0ubuntu31)

 -- Julian Andres Klode <email address hidden> Thu, 23 Jan 2020 10:55:46 +0100

Changed in python-apt (Ubuntu Focal):
status: Confirmed → Fix Released
Mathew Hodson (mhodson) on 2020-02-16
tags: added: regression-update
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers