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

Unify (repeated) licenses clients #67

Merged
merged 8 commits into from
May 13, 2019
Merged

Conversation

dgdavid
Copy link
Member

@dgdavid dgdavid commented May 10, 2019

Problem

There are three clients/modules practically identical.

Related to

Solution

Keep only one (firstboot_licenses.rb).

How?

Just converting the rest of them (firstboot_license.rb and firstboot_license_novell.rb) to symbolic links to ensure the backward compatibility.

Besides, to avoid showing the default license when only the selected one is desired, it is necessary to not take care about the default license directory since this is already being done in the InstLicense client.

So, from now on, the firstboot.xml workflow only needs to include "firstboot_licenses" module

<module>
  <label>License Agreement</label>
  <enabled config:type="boolean">true</enabled>
  <name>firstboot_licenses</name>
</module>

Although using "firstboot_license" or "firstboot_novell_license" will produce the same results.

Test

Screenshots

Let's see how the License agreement looks for each different scenarios. Click on each section to expand or collapse it.

Using the default values

That's, FIRSTBOOT_LICENSE_DIR and FIRSTBOOT_LICENSE_NOVELL_DIR are empty ("") or commented in /etc/sysconfig/firstboot.

The license texts found in the default directory (global param) will be displayed.

Screenshot_opensusetumbleweed_2019-05-10_15_19_38(1)

Using a valid path for FIRSTBOOT_LICENSE_DIR

Screenshot_opensusetumbleweed_2019-05-10_15_40_49(1)

Screenshot_opensusetumbleweed_2019-05-10_15_42_33

Using a valid path for FIRSTBOOT_LICENSE_NOVELL_DIR

Screenshot_opensusetumbleweed_2019-05-10_15_38_27(1)

Screenshot_opensusetumbleweed_2019-05-10_15_38_44

Using a valid path for both, FIRSTBOOT_LICENSE_DIR and FIRSTBOOT_LICENSE_NOVELL_DIR

Screenshot_opensusetumbleweed_2019-05-10_15_43_50(1)

Screenshot_opensusetumbleweed_2019-05-10_15_43_33


NOTE: if any license file could not be found, the client simply will be skipped.

From now on, they will be symlinks to the "firstboot_licenses" client
wich is in charge to display found licenses according to sysconfig
values for FIRSTBOOT_LICENSE_DIR and FIRSTBOOT_LICENSE_NOVELL_DIR
@dgdavid dgdavid force-pushed the feature/improve-firstboot-xml branch 4 times, most recently from 7d45d66 to 187d27e Compare May 10, 2019 18:31
This will be the client used when the firstboot.xml's workflow contains
whichever of below modules

  * firstboot_license
  * firstboot_licence_novell
  * firstboot_licenses (itself)

Beyond the code reorganization, to work as is expected it does not take
care of the default licenses directory anymore. This is already being
done in the Yast::InstLicenseClient.
To use the (new) "firstboot_licenses" client for license agreement.
@dgdavid dgdavid force-pushed the feature/improve-firstboot-xml branch from 187d27e to ea2fe5f Compare May 10, 2019 18:46
@dgdavid dgdavid marked this pull request as ready for review May 13, 2019 07:51
.gitignore Outdated Show resolved Hide resolved
test/test_helper.rb Outdated Show resolved Hide resolved
@dgdavid dgdavid merged commit 711f8b9 into SLE-12-SP4 May 13, 2019
@dgdavid dgdavid deleted the feature/improve-firstboot-xml branch May 13, 2019 10:31
@dgdavid dgdavid changed the title Feature/improve firstboot xml Unify (repeated) licenses clients May 13, 2019
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

2 participants