Skip to content

Commit

Permalink
Support PPA in deb822 format
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericgiquel committed Mar 12, 2024
1 parent 22ed8ab commit b5e00e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/facter/apt_sources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
confine osfamily: 'Debian'
setcode do
sources = ['sources.list']
Dir.glob('/etc/apt/sources.list.d/*.list').each do |file|
Dir.glob('/etc/apt/sources.list.d/*.{list,sources}').each do |file|
sources.push(File.basename(file))
end
sources
Expand Down
6 changes: 5 additions & 1 deletion manifests/ppa.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@
$underscore_filename_no_slashes = regsubst($underscore_filename, '/', '-', 'G')
$underscore_filename_no_specialchars = regsubst($underscore_filename_no_slashes, '[\.\+]', '_', 'G')

$sources_list_d_filename = "${dash_filename_no_specialchars}-${release}.list"
if versioncmp($facts['os']['release']['full'], '23.10') < 0 {
$sources_list_d_filename = "${dash_filename_no_specialchars}-${release}.list"
} else {
$sources_list_d_filename = "${dash_filename_no_specialchars}-${release}.sources"
}

if versioncmp($facts['os']['release']['full'], '21.04') < 0 {
$trusted_gpg_d_filename = "${underscore_filename_no_specialchars}.gpg"
Expand Down

0 comments on commit b5e00e5

Please sign in to comment.