apt not respecting Ignore-Files-Silently directive

Bug #1936273 reported by Todd Taft
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Undecided
Unassigned

Bug Description

I have a configuration management system that stores a backup copy of files that it updates with a suffix based upon the date that the file is updated (.YYYY-MM-DD)

In Ubuntu 20.04, I have added a file 00ignore to the /etc/apt/apt.conf directory.

The contents of the file are one line:
Dir::Ignore-Files-Silently:: "\.[12][0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]$";

The system appears to read the file, but doesn't seem to process it, as apt and related programs still spit out warnings.

# apt-config dump |grep Ignore
Dir::Ignore-Files-Silently "";
Dir::Ignore-Files-Silently:: "~$";
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$";
Dir::Ignore-Files-Silently:: "\.[12][0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]$";
N: Ignoring file '99unclet-override.2021-06-15' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
N: Ignoring file '00unclet.2021-06-18' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension

Note: aptitude does not display this warning, although many other apt-related programs do (e.g. apt, apt-get, apt-config).

Revision history for this message
David Kalnischkies (donkult) wrote :

This is documented behavior due to in which order the various configuration places are evaluated: man apt.conf has the details at the top.

In other words, you have to set Dir::Ignore-Files-Silently in a config file specified with the APT_CONFIG environment variable for it to take effect for configuration files.

Changed in apt (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions