Replacing configuration file directory with file breaks unattended-upgrades
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unattended-upgrades (Ubuntu) |
Fix Released
|
Undecided
|
Balint Reczey | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Unattended-upgrades crashes when a package update changes a config dir to a config file.
* U-u stops installing security updates when it crashes.
[Test Case] (Xenial)
* Install an older version of the git package than the one available from xenial-security:
# apt install git=1:2.
* Change a configuration file to a directory and observe not fixed u-u crashing and fixed u-u installing the update.
# mv /etc/bash_
# mkdir /etc/bash_
# unattended-upgrade --verbose --dry-run
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: ['o=Ubuntu,
Traceback (most recent call last):
File "/usr/bin/
main(options)
File "/usr/bin/
if conffile_
File "/usr/bin/
with open(prefix + conf_file, 'rb') as fb:
IsADirectoryError: [Errno 21] Is a directory: '/etc/bash_
# fixed u-u:
# unattended-upgrade --verbose --dry-run
...
Unpacking git (1:2.17.
dpkg: warning: git: conffile '/etc/bash_
Setting up git (1:2.17.
dpkg: warning: git: conffile '/etc/bash_
...
[Regression Potential]
* As a known and demonstrated regression configuration files replaced with directories by the local administrator are overwritten and this is dpkg's default behavior. The same thing would happen when applying the security update using apt, and this is still better than skipping the security update.
[Original Bug Text]
The Ubuntu Error Tracker has been receiving reports about a problem regarding unattended-
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://
Traceback (most recent call last):
File "/usr/bin/
main(options)
File "/usr/bin/
if conffile_
File "/usr/bin/
with open(prefix + conf_file, 'rb') as fp:
IsADirectoryError: [Errno 21] Is a directory: '/etc/fonts/
summary: |
- /usr/bin/unattended-upgrade:IsADirectoryError:/usr/bin/unattended- - upgrade@1556:main:conffile_prompt + Replacing configuration file directory with file breaks unattended- + upgrades |
description: | updated |
Changed in unattended-upgrades (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Balint Reczey (rbalint) |
description: | updated |
This bug was fixed in the package unattended-upgrades - 0.99ubuntu2
---------------
unattended-upgrades (0.99ubuntu2) bionic; urgency=medium
* Run upgrade- between- snapshots only on amd64. upgrade' s Python code and uses
The test exercises only unattented-
dependencies from the frozen Debian snapshot archive thus running
it on all architectures would provide little benefit.
-- Balint Reczey <email address hidden> Tue, 13 Feb 2018 11:41:20 +0700