Skip to content

Commit b85be45

Browse files
authored
Merge pull request #1647 from bastelfreak/debian11
Debian 11: Use correct package name for python bindings
2 parents 0c6f4f1 + 45d8a9d commit b85be45

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

data/os/Debian/11.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

manifests/params.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@
161161
$plpython_package_name = pick($plpython_package_name, "postgresql-plpython-${version}")
162162

163163
$_ubuntu_2204 = ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '22.04') >= 0)
164-
$_debian_12 = ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['full'], '12') >= 0)
164+
$_debian_11 = ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['full'], '11') >= 0)
165165

166-
if $_ubuntu_2204 or $_debian_12 {
166+
if $_ubuntu_2204 or $_debian_11 {
167167
$python_package_name = pick($python_package_name, 'python3-psycopg2')
168168
} else {
169169
$python_package_name = pick($python_package_name, 'python-psycopg2')

metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
},
1515
{
1616
"name": "puppetlabs/apt",
17-
"version_requirement": ">= 9.2.0 < 11.0.0"
17+
"version_requirement": ">= 9.2.0 < 12.0.0"
1818
},
1919
{
2020
"name": "puppet/systemd",
21-
"version_requirement": ">= 4.0.1 < 9.0.0"
21+
"version_requirement": ">= 4.0.1 < 10.0.0"
2222
},
2323
{
2424
"name": "puppetlabs/concat",

spec/classes/lib/python_spec.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,18 @@
3030

3131
it {
3232
expect(subject).to contain_package('python-psycopg2').with(
33-
name: 'python-psycopg2',
33+
name: 'python3-psycopg2',
34+
ensure: 'present',
35+
)
36+
}
37+
end
38+
39+
describe 'on debian 12' do
40+
include_examples 'Debian 12'
41+
42+
it {
43+
expect(subject).to contain_package('python-psycopg2').with(
44+
name: 'python3-psycopg2',
3445
ensure: 'present',
3546
)
3647
}

spec/spec_helper_local.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ def param(type, title, param)
184184
let(:facts) { on_supported_os['debian-11-x86_64'] }
185185
end
186186

187+
shared_context 'Debian 12' do
188+
let(:facts) { on_supported_os['debian-12-x86_64'] }
189+
end
190+
187191
shared_context 'Ubuntu 18.04' do
188192
let(:facts) { on_supported_os['ubuntu-18.04-x86_64'] }
189193
end

0 commit comments

Comments
 (0)