Skip to content

Commit 22e3eac

Browse files
committed
Fix setting_type and signed_by
Use 'sources' instead of 'source' as the setting_type parsed to apt::setting Fix the data type of apt::source::signed_by
1 parent bdd15bb commit 22e3eac

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
'path' => $sources_list_d,
4545
'ext' => '.list',
4646
},
47-
'source' => {
47+
'sources' => {
4848
'path' => $sources_list_d,
4949
'ext' => '.sources',
5050
},

manifests/setting.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
$setting_type = $title_array[0]
3939
$base_name = join(delete_at($title_array, 0), '-')
4040

41-
assert_type(Pattern[/\Aconf\z/, /\Apref\z/, /\Alist\z/, /\Asource\z/], $setting_type) |$a, $b| {
42-
fail("apt::setting resource name/title must start with either 'conf-', 'pref-' or 'list-'")
41+
assert_type(Pattern[/\Aconf\z/, /\Apref\z/, /\Alist\z/, /\Asources\z/], $setting_type) |$a, $b| {
42+
fail("apt::setting resource name/title must start with either 'conf-', 'pref-', 'list-', or 'sources-'")
4343
}
4444

4545
if $priority !~ Integer {
@@ -49,7 +49,7 @@
4949
}
5050
}
5151

52-
if ($setting_type == 'list') or ($setting_type == 'pref') or ($setting_type == 'source') {
52+
if ($setting_type == 'list') or ($setting_type == 'pref') or ($setting_type == 'sources') {
5353
$_priority = ''
5454
} else {
5555
$_priority = $priority

manifests/source.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
# See https://wiki.debian.org/DebianRepository/UseThirdParty for details.
7878
#
7979
# @param signed_by
80-
# DEB822: Absolute path to a file containing the PGP keyring used to sign this repository.
80+
# DEB822: Either an absolute path to a PGP keyring file used to sign this repository OR a list of key fingerprints to trust.
8181
#
8282
# @param pin
8383
# Creates a declaration of the apt::pin defined type. Valid options: a number or string to be passed to the `id` parameter of the
@@ -121,7 +121,7 @@
121121
Variant[Hash] $include = {},
122122
Optional[Variant[String, Hash]] $key = undef,
123123
Optional[Stdlib::AbsolutePath] $keyring = undef,
124-
Optional[Array[Stdlib::AbsolutePath]] $signed_by = undef, # deb822
124+
Optional[Variant[Stdlib::AbsolutePath,Array[String]]] $signed_by = undef, # deb822
125125
Optional[Variant[Hash, Numeric, String]] $pin = undef,
126126
Optional[String] $architecture = undef,
127127
Optional[Array[String]] $architectures = undef, # deb822

templates/source_deb822.epp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Optional[Enum['yes','no']] $allow_insecure = undef,
99
Optional[Enum['yes','no']] $repo_trusted = undef,
1010
Optional[Enum['yes','no']] $check_valid_until = undef,
11-
Optional[Variant[Array[String], String]] $signed_by = undef,
11+
Optional[Variant[Stdlib::AbsolutePath,Array[String]]] $signed_by = undef,
1212
| -%>
1313
# <%= $comment %>
1414
Enabled: <%= $enabled %>

0 commit comments

Comments
 (0)