Compare commits

...

1 Commits

Author SHA1 Message Date
Jordan Sissel 17297d191c Only show /etc "config files" warning when files are present in /etc.
This should silence a warning in cases when packages do not contain any
/etc files. Prior to this commit, most debian package creation would
have this warning emitted:

```
Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag {:level=>:warn}
```

Fixes #1851
2021-11-09 21:05:55 -08:00
1 changed files with 1 additions and 1 deletions

View File

@ -1007,7 +1007,7 @@ class FPM::Package::Deb < FPM::Package
etcfiles = []
# Add everything in /etc
begin
if !attributes[:deb_no_default_config_files?]
if !attributes[:deb_no_default_config_files?] && File.exists?(staging_path("/etc"))
logger.warn("Debian packaging tools generally labels all files in /etc as config files, " \
"as mandated by policy, so fpm defaults to this behavior for deb packages. " \
"You can disable this default behavior with --deb-no-default-config-files flag")