-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Bugfix: zypper issue with specified package versions #4421
Conversation
zypper.py was doing nothing on state=present, when ALL requestet/checked packages had a specific version stated. This was caused by get_installed_state() being called with an empty package list, which in this case returns information about all ALL installed packages. This lead to an exessive filter list prerun_state, essentially removing all packages that are installed in ANY version on the target system from the request list.
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.
Thanks for your contribution! Can you add a changelog fragment? Thanks.
added changelog fragment for #4421
done ... on 2nd try 🙈 ... |
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 good to me! If nobody complains, I'll merge beginning of next week.
(I'm not using zypper, so would be great if someone else who actually uses / knows zypper can take a look :) )
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 am okay with this, but I didn't test it.
Backport to stable-3: 💚 backport PR created✅ Backport PR branch: Backported as #4445 🤖 @patchback |
* fixed issue with specified package versions zypper.py was doing nothing on state=present, when ALL requestet/checked packages had a specific version stated. This was caused by get_installed_state() being called with an empty package list, which in this case returns information about all ALL installed packages. This lead to an exessive filter list prerun_state, essentially removing all packages that are installed in ANY version on the target system from the request list. * Create 4421-zypper_package_version_handling_fix added changelog fragment for #4421 * Delete 4421-zypper_package_version_handling_fix * Create 4421-zypper_package_version_handling_fix.yml (cherry picked from commit bbe231e)
Backport to stable-4: 💚 backport PR created✅ Backport PR branch: Backported as #4446 🤖 @patchback |
* fixed issue with specified package versions zypper.py was doing nothing on state=present, when ALL requestet/checked packages had a specific version stated. This was caused by get_installed_state() being called with an empty package list, which in this case returns information about all ALL installed packages. This lead to an exessive filter list prerun_state, essentially removing all packages that are installed in ANY version on the target system from the request list. * Create 4421-zypper_package_version_handling_fix added changelog fragment for #4421 * Delete 4421-zypper_package_version_handling_fix * Create 4421-zypper_package_version_handling_fix.yml (cherry picked from commit bbe231e)
* fixed issue with specified package versions zypper.py was doing nothing on state=present, when ALL requestet/checked packages had a specific version stated. This was caused by get_installed_state() being called with an empty package list, which in this case returns information about all ALL installed packages. This lead to an exessive filter list prerun_state, essentially removing all packages that are installed in ANY version on the target system from the request list. * Create 4421-zypper_package_version_handling_fix added changelog fragment for #4421 * Delete 4421-zypper_package_version_handling_fix * Create 4421-zypper_package_version_handling_fix.yml (cherry picked from commit bbe231e) Co-authored-by: tover99 <101673769+tover99@users.noreply.github.com>
* fixed issue with specified package versions zypper.py was doing nothing on state=present, when ALL requestet/checked packages had a specific version stated. This was caused by get_installed_state() being called with an empty package list, which in this case returns information about all ALL installed packages. This lead to an exessive filter list prerun_state, essentially removing all packages that are installed in ANY version on the target system from the request list. * Create 4421-zypper_package_version_handling_fix added changelog fragment for #4421 * Delete 4421-zypper_package_version_handling_fix * Create 4421-zypper_package_version_handling_fix.yml (cherry picked from commit bbe231e) Co-authored-by: tover99 <101673769+tover99@users.noreply.github.com>
zypper.py was doing nothing on state=present, when ALL requestet/checked packages had a specific version stated. This was caused by get_installed_state() being called with an empty package list, which in this case returns information about all ALL installed packages. This lead to an exessive filter list prerun_state, essentially removing all packages that are installed in ANY version on the target system from the request list.
SUMMARY
I added an empty check to prevent get_installed_state() being called with an empty package list.
Fixes ##4371
ISSUE TYPE
COMPONENT NAME
zypper
ADDITIONAL INFORMATION
The following task ALWAYS reported [ok] if ANY version of a-very-important-package was already installed on the target system.
As soon as at least ONE other package WITHOUT a version specification was requestet, everything worked as expected.
after my fix, that workaroud is not necessary and both of the above work as expected