add option to allow excluding binaries from being upgraded

This commit is contained in:
2026-04-30 11:49:16 +02:00
parent c4a63073f8
commit d6ced582d2
2 changed files with 13 additions and 2 deletions

View File

@@ -14,11 +14,13 @@
# @param [String] ac_emit_via how to inform about emitted updates
# @param [String] ac_email_to where to send the email to
# @param [String] ac_email_host which host to use to send the email
# @param [Variant[String,Array[String]]] ac_excludepkgs packages to exclude from updates
##############################################################################
class confdroid_automatic::params (
String $ac_reqpackages = 'dnf-automatic',
String $ac_pkg_ensure = 'latest',
String $ac_reqpackages = 'dnf-automatic',
String $ac_pkg_ensure = 'latest',
Variant[String, Array[String]] $ac_excludepkgs = [],
# updates
String $ac_upgrade_type = 'default',
@@ -45,6 +47,11 @@ class confdroid_automatic::params (
$ac_main_config = '/etc/dnf/automatic.conf'
$ac_main_config_erb = 'confdroid_automatic/automatic.conf.erb'
$ac_excludepkgs_normalized = $ac_excludepkgs ? {
Array => join($ac_excludepkgs, ','),
default => $ac_excludepkgs,
}
# includes must be last
include confdroid_automatic::main::config
}

View File

@@ -93,5 +93,9 @@ email_to = <%= @ac_email_to %>
[base]
# This section overrides dnf.conf
<% unless @ac_excludepkgs_normalized.empty? -%>
excludepkgs = <%= @ac_excludepkgs_normalized %>
<% end -%>
# Use this to filter DNF core messages
debuglevel = 1