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

Do not abort the installation when an addon EULA is refused #439

Merged

Conversation

dgdavid
Copy link
Member

@dgdavid dgdavid commented Jun 18, 2019

Problem

When user refuses an addon's EULA (doing click in "Next" without check the I Agree to the License Terms.) the installation is completely aborted.

Solution

In spite of in the current code there is an intentional (and broken) behavior to

go back or abort if any EULA has not been accepted — addon_eula_dialog.rb#L63

it seems that the correct behavior should be just go ahead refusing the license and not installing/registering the addon, according to the message shown to the user.

Show/hide screenshot

Screenshot_sles12-sp4_2019-06-19_11_28_47

To do that, it has been necessary to update yast2-packager too (see yast/yast-packager#452), in order to support "refuse" as a cancel action. Otherwise, it is not possible to distinguish when the "abort" means "to refuse the license agreement" or "abort the installation".

Tests

  • Added and updated some unit tests.
  • Tested manually via driver update.

Caveats

The selection is untouched. I.e., when a license is refused but the user goes back to the select extensions dialog, the product is still selected.

@dgdavid dgdavid force-pushed the feature/bsc-1114018-not-abort-when-refuse-a-license branch from 5e9b416 to 683d405 Compare June 19, 2019 08:38
@coveralls
Copy link

coveralls commented Jun 19, 2019

Coverage Status

Coverage increased (+0.9%) to 64.565% when pulling efe319f on feature/bsc-1114018-not-abort-when-refuse-a-license into f3d621e on SLE-12-SP5.

@dgdavid dgdavid force-pushed the feature/bsc-1114018-not-abort-when-refuse-a-license branch 2 times, most recently from 3cd3b8f to a8275e6 Compare June 19, 2019 09:52
@dgdavid dgdavid requested a review from lslezak June 19, 2019 11:00
@dgdavid dgdavid marked this pull request as ready for review June 19, 2019 11:11
@dgdavid dgdavid force-pushed the feature/bsc-1114018-not-abort-when-refuse-a-license branch from a8275e6 to 2aad7cd Compare June 19, 2019 11:15
@dgdavid dgdavid changed the title Feature/bsc 1114018 not abort when refuse a license Do not abort the installation when an addon EULA is refused Jun 19, 2019
Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

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

Some minor suggestions

src/clients/inst_scc.rb Outdated Show resolved Hide resolved
src/lib/registration/ui/addon_eula_dialog.rb Outdated Show resolved Hide resolved
test/addon_spec.rb Show resolved Hide resolved
test/addon_spec.rb Outdated Show resolved Hide resolved
test/registration/ui/addon_eula_dialog_spec.rb Outdated Show resolved Hide resolved
@dgdavid dgdavid force-pushed the feature/bsc-1114018-not-abort-when-refuse-a-license branch from 21e3271 to e54b462 Compare June 20, 2019 10:40
Which allows to extract those selected addons

  * that do not require an EULA acceptance
  * whose EULA were not refused
Allowing to refuse an EULA without aborting the installation. Simply do
not set the EULA as accepted and do not register the addon later, as is
explained in the message shown to the user before refuse the license.
Using a `case` statement instead of multiple/isolated `if`s.
Which will return the addons pending to be registered.
@dgdavid dgdavid force-pushed the feature/bsc-1114018-not-abort-when-refuse-a-license branch 2 times, most recently from 343258f to 9495a9a Compare June 20, 2019 11:47
dgdavid and others added 5 commits July 1, 2019 10:21
Co-Authored-By: Ladislav Slezák <lslezak@suse.cz>
Just initializating the EULA acceptance to false.
Co-Authored-By: Ladislav Slezák <lslezak@suse.cz>
@dgdavid dgdavid force-pushed the feature/bsc-1114018-not-abort-when-refuse-a-license branch from 9495a9a to efe319f Compare July 1, 2019 09:22
@dgdavid
Copy link
Member Author

dgdavid commented Jul 1, 2019

yast2-packager dependency updated. After resolve a conflict the new version is 3.3.1.

@dgdavid dgdavid merged commit 2f601ee into SLE-12-SP5 Jul 1, 2019
@dgdavid dgdavid deleted the feature/bsc-1114018-not-abort-when-refuse-a-license branch July 1, 2019 09:47
@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #2 successfully finished

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