Merge branch 'feature/type/__apt_norecommends/reuse-file' into 'master'

__apt_norecommends: Use 00InstallRecommends file as debian-installer does

See merge request ungleich-public/cdist!945
This commit is contained in:
poljakowski 2020-11-06 08:26:36 +01:00
commit 67f1475a20
2 changed files with 27 additions and 23 deletions

View File

@ -32,11 +32,12 @@ EXAMPLES
AUTHORS AUTHORS
------- -------
Steven Armstrong <steven-cdist--@--armstrong.cc> Steven Armstrong <steven-cdist--@--armstrong.cc>
Dennis Camera <dennis.camera--@--ssrq-sds-fds.ch>
COPYING COPYING
------- -------
Copyright \(C) 2014 Steven Armstrong. You can redistribute it Copyright \(C) 2014 Steven Armstrong, 2020 Dennis Camera.
and/or modify it under the terms of the GNU General Public License as You can redistribute it and/or modify it under the terms of the GNU General
published by the Free Software Foundation, either version 3 of the Public License as published by the Free Software Foundation, either version 3 of
License, or (at your option) any later version. the License, or (at your option) any later version.

View File

@ -1,6 +1,7 @@
#!/bin/sh -e #!/bin/sh -e
# #
# 2014 Steven Armstrong (steven-cdist at armstrong.cc) # 2014 Steven Armstrong (steven-cdist at armstrong.cc)
# 2020 Dennis Camera (dennis.camera at ssrq-sds-fds.ch)
# #
# This file is part of cdist. # This file is part of cdist.
# #
@ -19,26 +20,28 @@
# #
os=$(cat "$__global/explorer/os") os=$(cat "${__global:?}/explorer/os")
case "$os" in case ${os}
ubuntu|debian|devuan) in
# No stinking recommends thank you very much. (ubuntu|debian|devuan)
# If I want something installed I will do so myself. __file /etc/apt/apt.conf.d/00InstallRecommends --state present \
__file /etc/apt/apt.conf.d/99-no-recommends \ --owner root --group root --mode 0644 --source - <<-'EOF'
--owner root --group root --mode 644 \ APT::Install-Recommends "false";
--source - << DONE APT::Install-Suggests "false";
APT::Install-Recommends "0"; APT::AutoRemove::RecommendsImportant "false";
APT::Install-Suggests "0"; APT::AutoRemove::SuggestsImportant "false";
APT::AutoRemove::RecommendsImportant "0"; EOF
APT::AutoRemove::SuggestsImportant "0";
DONE # TODO: Remove the following object after some time
;; require=__file/etc/apt/apt.conf.d/00InstallRecommends \
*) __file /etc/apt/apt.conf.d/99-no-recommends --state absent
cat >&2 << DONE ;;
(*)
cat >&2 <<EOF
The developer of this type (${__type##*/}) did not think your operating system The developer of this type (${__type##*/}) did not think your operating system
($os) would have any use for it. If you think otherwise please submit a patch. ($os) would have any use for it. If you think otherwise please submit a patch.
DONE EOF
exit 1 exit 1
;; ;;
esac esac