apt not respecting Ignore-Files-Silently directive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Invalid
|
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-
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-
Dir::Ignore-
Dir::Ignore-
Dir::Ignore-
Dir::Ignore-
Dir::Ignore-
Dir::Ignore-
Dir::Ignore-
Dir::Ignore-
Dir::Ignore-
N: Ignoring file '99unclet-
N: Ignoring file '00unclet.
Note: aptitude does not display this warning, although many other apt-related programs do (e.g. apt, apt-get, apt-config).
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.