apt-config: avoid APT complaints about sources backup files
Before apt-config makes a change to ubuntu.sources or another source
file, it backs up the original file by appending the .curtin.old
extension.
However, by default, APT will emit a warning when a file with an unknown
extension is present in the etc/apt/sources.list.d directory. Currently,
known extensions are .sources and .list so when APT sees our .curtin.old
files, it does emit a warning.
> N: Ignoring file 'ubuntu.sources.curtin.old' in directory
'/etc/apt/sources.list.d/' as it has an invalid filename extension
Through Dir::Ignore-Files-Silently directives, APT can be configured to
ignore (i.e., not warn) some of the files that have unknown extensions.
By default, the list includes:
Dir::Ignore-Files-Silently:: "\.disabled$";
Dir::Ignore-Files-Silently:: "\.bak$";
Dir::Ignore-Files-Silently:: "\.dpkg-[a-z]+$";
Dir::Ignore-Files-Silently:: "\.ucf-[a-z]+$";
Dir::Ignore-Files-Silently:: "\.save$";
Dir::Ignore-Files-Silently:: "\.orig$";
Dir::Ignore-Files-Silently:: "\.distUpgrade$";
We now back up the files using the .curtin.orig extension instead of
.curtin.old so that APT does not complain.
LP: #2058741
Signed-off-by: Olivier Gayot <email address hidden>