Skip to content
This repository has been archived by the owner on Jun 25, 2023. It is now read-only.

Get rid of backup file #31

Closed
wants to merge 1 commit into from
Closed

Conversation

veger
Copy link

@veger veger commented Nov 21, 2016

This file is created by apt-get install because of the modifications in the original file
When using apt a warning is issued that a file in /etc/apt/apt.conf.d is found with an unknown extension

This file is created by apt-get install because of the modifications in the original file
When using apt a warning is issued that a file in /etc/apt/apt.conf.d is found with an unknown extension
@jnv
Copy link
Owner

jnv commented Nov 21, 2016

Thanks for the PR Maarten. I am aware of the .ucf-dist file being generated in some cases, like #30 and #10, but my suspicion was the file gets generated after full distribution upgrade. But perhaps this is not the only case. So is the file generated also when unattended-upgrades package is upgraded?

I am rather cautious about deleting stuff from the system, so I would probably prefer to put notice in the readme as we did with /etc/apt/apt.conf.d/10periodic file in #3.

@veger
Copy link
Author

veger commented Nov 21, 2016

Ah.. I only checked the open issues for this, so I did not notice these closed issues.

It indeed (also) happens when unattended-updates package is updated.

The file is the original package file renamed/backupped by apt because it saw that the file is modified (by us). So throwing away an original file does not seem to be a big issue (if it is a clean install we modify the original directly!)

I you want, we could add a parameter to enable/disable this behavior?

@jnv
Copy link
Owner

jnv commented Nov 21, 2016

Well, I think I have a better idea how to solve this. Since there is apt.conf.d directory, configuration files are applied in order and the file with higher number overrides previous. Therefore we don't need to modify original files; we just generate a new file with a high number, say 90-ansible-unattended-upgrades. Apt will happily manage defaults and no ucf-dist files will be generated. I will start a new issue for this, since it will be a breaking change and I need to think a bit about handling the transition.

As for the current version, I would rather prefer to add instructions into README rather than to add new behaviour (and configuration option) which will be obsolete in the future.

@goetzc
Copy link

goetzc commented Jul 18, 2017

With the latest version, 1.3.0, I see the same error on all machines, after apt update:

Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension

Is it possible to just have the file named that way, 90-ansible-unattended-upgrades?

@jnv jnv closed this May 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants