-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#1556) Fix Python package name for Ubuntu >= 22.04 #1557
(#1556) Fix Python package name for Ubuntu >= 22.04 #1557
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In itself this is correct.
manifests/params.pp
Outdated
@@ -159,7 +159,12 @@ | |||
$perl_package_name = pick($perl_package_name, 'libdbd-pg-perl') | |||
$plperl_package_name = pick($plperl_package_name, "postgresql-plperl-${version}") | |||
$plpython_package_name = pick($plpython_package_name, "postgresql-plpython-${version}") | |||
$python_package_name = pick($python_package_name, 'python-psycopg2') | |||
|
|||
if $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '22.04') >= 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the same is needed at least for Debian 12. For Debian 11 there still is python-psycopg2
as well as python3-psycopg2
. Would you mind doing the same for Debian >= 12 at least while you're at it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added such a test for Debian 12 as well, trying to make the logic somewhat readable. Not sure if this is in tune with the module's coding style though.
…ian 12 For Ubuntu 22.04 and Debian 12 and later the Python PostgreSQL package is called "python3-psycopg2" so make that distinction in params.pp.
f02d33c
to
9d4fc30
Compare
I don't see how the failing checks are related so I'm merging this |
Summary
For Ubuntu 22.04 and later the Python PostgreSQL package is called "python3-psycopg2" so make that distinction in params.pp.
Additional Context
This is missing spec tests but apparently there are no examples for Ubuntu past 18.04 so not sure where I would add tests to cover this change.
Related Issues (if any)
Fixes #1556
Checklist
puppet apply
)