Skip to content

python plugins: give python3 plugins priority over python2 plugins in packages#1332

Merged
arogge merged 3 commits intomasterfrom
dev/pstorz/master/rename-python2-plugins-to-python27-plugins
Dec 14, 2022
Merged

python plugins: give python3 plugins priority over python2 plugins in packages#1332
arogge merged 3 commits intomasterfrom
dev/pstorz/master/rename-python2-plugins-to-python27-plugins

Conversation

@pstorz
Copy link
Member

@pstorz pstorz commented Dec 12, 2022

Thank you for contributing to the Bareos Project!

The python2 plugin packages have been renamed to python27-plugin, so that the preferred python3 plugin version will be installed first instead of the deprecated python2 version.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Is the PR title usable as CHANGELOG entry?
  • Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems

@pstorz pstorz force-pushed the dev/pstorz/master/rename-python2-plugins-to-python27-plugins branch 2 times, most recently from cc8b5bc to 4ebcf4e Compare December 13, 2022 13:17
@pstorz pstorz changed the title python plugins: rename python2-plugin to python27-plugin globally python plugins: give python3 plugins priority over python2 plugins in packages Dec 13, 2022
@arogge arogge force-pushed the dev/pstorz/master/rename-python2-plugins-to-python27-plugins branch from 905c7f5 to 10d4cc9 Compare December 13, 2022 15:34
pstorz and others added 2 commits December 14, 2022 10:35
Previously the RPM depsolver selected the python2 plugins. So if you
installed bareos-filedaemon-postgresql-python-plugin that would require
bareos-filedaemon-python-plugin which in turn was resolved by adding
bareos-filedaemon-python2-plugin to the transaction.
With the suggests added with this patch, the depsolver will not prefer
the python3 plugin, so that in the above example
bareos-filedaemon-python3-plugin would be installed.

As rpm on RHEL 7 does not yet support suggests, the fix does not apply
to that platform.
Previously the python plugins depended on a virtual provides. This lead
to a situation where the python2 and python3 plugin were treated equally
and were both installed by default.
By changing this to basically "Depends: python3-plugin | python2-plugin"
the depsolver will not prefer python3 and not install python2 unless you
explitictly require it.
@arogge arogge force-pushed the dev/pstorz/master/rename-python2-plugins-to-python27-plugins branch from 10d4cc9 to 408203f Compare December 14, 2022 09:39
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependency resolution is pretty weird. We finally got it working and that status should be merged.

@arogge arogge merged commit a3ec0ab into master Dec 14, 2022
@arogge arogge deleted the dev/pstorz/master/rename-python2-plugins-to-python27-plugins branch December 14, 2022 13:41
alaaeddineelamri pushed a commit that referenced this pull request Dec 30, 2022
python plugins: give python3 plugins priority over python2 plugins in packages
alaaeddineelamri pushed a commit that referenced this pull request Dec 30, 2022
python plugins: give python3 plugins priority over python2 plugins in packages
alaaeddineelamri pushed a commit that referenced this pull request Dec 30, 2022
python plugins: give python3 plugins priority over python2 plugins in packages
alaaeddineelamri pushed a commit that referenced this pull request Dec 31, 2022
python plugins: give python3 plugins priority over python2 plugins in packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants