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

Run pre-scripts just after the profile has been processed #637

Merged
merged 16 commits into from
Jul 9, 2020

Conversation

teclator
Copy link
Contributor

@teclator teclator commented Jul 3, 2020

Problem

AutoYaST pre-scripts are expected to be run before any other configuration, but since the introduction of the unified installation medium them are run after a check of the selected product.

If the profile is modified by user pre-scripts providing the product name to be used, a error eport will be shown as there is no product defined in the profile.

Solution

Move the execution of the user pre-scripts as early as possible, that is, just after the profile has been processed.

This solution was already merged into SLE-15-GA and SLE-15-SP1 (#638 & #641) , so, this PR is a merge PR o that changes.

Test

  • Tested manually using a shell script to fetch the completely profile:

Minimal fetch profile

<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
  <scripts>
    <pre-scripts config:type="list">
      <script>
        <debug config:type="boolean">false</debug>
        <feedback config:type="boolean">false</feedback>
        <filename>pre-fetch.sh</filename>
        <interpreter>shell</interpreter>
	<location><![CDATA[http://192.168.122.1/dud/scripts/pre-fetch.sh]]></location>
        <notification>Please wait while pre-fetch.sh is running...</notification>
      </script>
    </pre-scripts>
  </scripts>
</profile>

fetch script

#!/bin/sh

wget "http://192.168.122.1/dud/sle15_sp2_minimal.xml" -O /tmp/profile/modified.xml

exit 0

schubi2 and others added 6 commits February 27, 2020 11:28
… (#566)

* Init script: Checking working network with network-online.target (#564)
* Init script: Checking working network with network-online.target (#564)

* Init script: Checking working network with network-online.target
Permit to use CDATA in the ntp_policy attribute
@teclator teclator force-pushed the execute_prescripts_earlier branch from 2b6a8e4 to 615596f Compare July 3, 2020 15:39
@coveralls
Copy link

coveralls commented Jul 3, 2020

Coverage Status

Coverage increased (+0.2%) to 36.201% when pulling aa3cd68 on execute_prescripts_earlier into cceb533 on SLE-15-SP2.

@teclator teclator force-pushed the execute_prescripts_earlier branch from 615596f to 6353585 Compare July 3, 2020 15:43
@teclator
Copy link
Contributor Author

teclator commented Jul 8, 2020

During tests we have found that askDialog is already broken in SLE-15-SP2 since:

https://github.com/yast/yast-autoinstallation/pull/543/files#diff-0ca1c0540430356a2ed134aeeda8c987R80

as the client does not include Yast::UIShortcuts. Before the move to a class it inherited from Yast::Client, so already included it.

https://github.com/yast/yast-autoinstallation/pull/543/files#diff-c48716dab37675fe6b5e8c896f961ba0L13
https://github.com/yast/yast-ruby-bindings/blob/master/src/ruby/yast/client.rb#L11

@teclator teclator force-pushed the execute_prescripts_earlier branch from 6353585 to c6cc9e8 Compare July 8, 2020 15:29
@teclator teclator marked this pull request as ready for review July 8, 2020 15:33
@teclator teclator requested a review from imobachgs July 8, 2020 15:59
@teclator teclator merged commit 115707b into SLE-15-SP2 Jul 9, 2020
@teclator teclator deleted the execute_prescripts_earlier branch July 9, 2020 08:46
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