[Bug 1796100] Re: crashes while trying to open auxfiles as .deb
Launchpad Bug Tracker
1796100 at bugs.launchpad.net
Mon Oct 8 22:05:31 UTC 2018
This bug was fixed in the package unattended-upgrades - 1.5ubuntu3
---------------
unattended-upgrades (1.5ubuntu3) cosmic; urgency=medium
* Skip already adjusted packages from being checked for readjusting.
This makes it clearer that the recursion ends and can also be a bit quicker.
(LP: #1790687)
* Fix PEP 8 warnings.
Also ignore "W503 line break before binary operator" because it will
become the best practice.
* Don't crash on missing dpkg log file (LP: #1795692)
* do_auto_remove() is successful unless a commit() operation fails
(LP: #1795696)
* Check only dowloaded .deb files for conffile prompts (LP: #1796100)
-- Balint Reczey <rbalint at ubuntu.com> Sun, 07 Oct 2018 23:16:17 +0200
** Changed in: unattended-upgrades (Ubuntu)
Status: Triaged => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to unattended-upgrades in Ubuntu.
https://bugs.launchpad.net/bugs/1796100
Title:
crashes while trying to open auxfiles as .deb
Status in unattended-upgrades package in Ubuntu:
Fix Released
Bug description:
[Impact]
unattended-upgrades does not work (reliably) in (bionic and) cosmic
with the mirror:// method, as it tries to open the mirror file - which
recent apt versions store in auxfiles - as a .deb:
2018-10-04 08:58:46,801 ERROR failed to read deb file /var/lib/apt/lists/auxfiles/_etc_apt_mirrors.list (E:Invalid archive signature)
2018-10-04 08:58:46,801 ERROR failed to read deb file /var/lib/apt/lists/auxfiles/_etc_apt_mirrors.list (E:Invalid archive signature)
2018-10-04 08:58:46,807 ERROR Apt returned an error, exiting
2018-10-04 08:58:46,807 ERROR error message: E:Invalid archive signature
2018-10-04 08:58:46,808 ERROR An error occurred: E:Invalid archive signature
Traceback (most recent call last):
File "/usr/bin/unattended-upgrade", line 1595, in main
install_start_time)
File "/usr/bin/unattended-upgrade", line 1800, in run
if conffile_prompt(item.destfile):
File "/usr/bin/unattended-upgrade", line 860, in conffile_prompt
deb = apt_inst.DebFile(destFile)
apt_pkg.Error: E:Invalid archive signature
[Test case]
1. Start with a not fully upgrades system, then configure it to use
mirror:// :
root at cc-apt:~# echo 'deb mirror+file:/etc/apt/mirrors.list cosmic main
restricted' > /etc/apt/sources.list.d/mirrors-cosmic.list
root at cc-apt:~# echo 'http://ftp.kfki.hu/linux/ubuntu/' > /etc/apt/mirrors.list
root at cc-apt:~# echo 'Unattended-Upgrade::DevRelease "true";' > /etc/apt/apt.conf.d/51unattended-upgrades-on-deb
root at cc-apt:~# apt update
Get:1 file:/etc/apt/mirrors.list Mirrorlist [33 B]
Get:2 http://ftp.kfki.hu/linux/ubuntu cosmic InRelease [242 kB]
...
Translation-en [73.7 kB]
Fetched 27.1 MB in 10s (2812 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
280 packages can be upgraded. Run 'apt list --upgradable' to see them.
2. Clean downloaded files to make u-u redownload them:
root at cc-apt:~# apt-get clean
root at cc-apt:~# rm -f /var/lib/apt/lists/auxfiles/*
3. Run u-u and observe it crashing with the not fixed version and
proceeding properly after the fix is applied.
root at cc-apt:~# unattended-upgrade --dry-run
Apt returned an error, exiting
error message: E:Invalid archive signature
Traceback (most recent call last):
File "/usr/bin/unattended-upgrade", line 2064, in <module>
sys.exit(main(options))
File "/usr/bin/unattended-upgrade", line 1595, in main
install_start_time)
File "/usr/bin/unattended-upgrade", line 1800, in run
if conffile_prompt(item.destfile):
File "/usr/bin/unattended-upgrade", line 860, in conffile_prompt
deb = apt_inst.DebFile(destFile)
apt_pkg.Error: E:Invalid archive signature
[Regression potential]
The fix makes u-u check only files with .deb extension if they may
raise configuration prompt. For supporting other file extensions the
file name pattern will need to be updated.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1796100/+subscriptions
More information about the foundations-bugs
mailing list