[WIP] Warn when an old package is selected to install#878
Draft
lslezak wants to merge 6 commits intoyast:SLE-15-SP1from
lslezak:old_packages
Draft
[WIP] Warn when an old package is selected to install#878lslezak wants to merge 6 commits intoyast:SLE-15-SP1from lslezak:old_packages
lslezak wants to merge 6 commits intoyast:SLE-15-SP1from
lslezak:old_packages
Conversation
jreidinger
reviewed
Jul 28, 2020
jreidinger
reviewed
Jul 28, 2020
jreidinger
reviewed
Jul 28, 2020
jreidinger
reviewed
Jul 28, 2020
Member
Author
|
This is waiting for the final approval by @jsrain and the maintenance team. Also the exact message and and the list of the affected packages should be provided. |
Member
|
@lslezak I've just run across this while checking another old PR of mine... I wanted to check its status myself but there is no context, like a bug, PBI or similar. Is this still relevant? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notes
This is just a draft implementation for getting some feedback early.
Problem
We need to display a warning when user is going to install some known old packages which contain some serious bugs or do not work properly in some situations.
The Solution
We need to somehow get the data about the obsolete packages, hardcoding the package names and versions directly in the YaST code does not look like a good idea.
My proposal is to read the data about the old packages from YAML files stored in
data/old_packages/*.y{,a}ml. Each file would contain a list of known old packages (with name, version and architecture) and a message which is displayed to the user when a package older or equal to the specified version is selected to install.See the example
src/data/old_packages/sle15_sp1.ymlfile below in the diff.Advantages
Y2DIRsetting and prefers the/y2update/files so the existing files can be overridden by a 3rd party add-on.AutoYaST Support
The warning message is also displayed in the AutoYaST mode. By default warnings are automatically closed after 10 seconds time out so this change does not block the AutoYaST installation.
Missing Feature
We do not support translatable strings in YAML files. Moreover patching the translations is not easy with the current translations architecture. The problem is that the translations are stored per language (
yast2-trans-<LANG>packages), we would need to release a self-update for many packages.And getting the actual translations would be difficult, the problematic packages are found after the release and then it's hard to get new translations. And we would need them ASAP to react quickly when a new serious problem is found.
Therefore the translations are not supported. But I think having just English messages is acceptable in this case, given how difficult it would be to get the translations and release them...
Screenshots
Tested in SP1 with a testing YAML file.
TODO
src/data/old_packages/sle15_sp1.ymlfile to contain the real data