Skip to content
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

[WIP] Warn when an old package is selected to install #878

Draft
wants to merge 6 commits into
base: SLE-15-SP1
Choose a base branch
from
Draft

[WIP] Warn when an old package is selected to install #878

wants to merge 6 commits into from

Conversation

lslezak
Copy link
Member

@lslezak lslezak commented Jul 28, 2020

Notes

⚠️ Do not merge yet! We need to add the real data about the old packages! ⚠️

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.yml file below in the diff.

Advantages

  • The YAML file can be provided by any package and can be added to the inst-sys by any mechanism (DUD, self-update, 3rd party add-on).
  • The packages with the same message are grouped together, this means it's possible to easily add a new package to the existing list.
  • The installer honors the Y2DIR setting 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.

old_packages_popup_sp1

TODO

  • Check it also in the upgrade mode (and AutoUpgrade as well...)
  • Adapt the src/data/old_packages/sle15_sp1.yml file to contain the real data

@coveralls
Copy link

coveralls commented Jul 28, 2020

Coverage Status

Coverage increased (+0.4%) to 23.793% when pulling 57c1e6a on lslezak:old_packages into a742e05 on yast:SLE-15-SP1.

@lslezak lslezak marked this pull request as draft September 25, 2020 07:14
@lslezak
Copy link
Member Author

lslezak commented Sep 25, 2020

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.

@mvidner
Copy link
Member

mvidner commented Mar 29, 2022

@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?

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.

None yet

4 participants