YaST2 Developers Documentation: installation

installation

modules/ProductControl.ycp
Product Control routines
  • Anas Nashif
  • Stanislav Visnovsky
  • Jiri Srain
  • Lukas Ocilka

This module has an unstable interface.

Imports

  • Arch
  • Directory
  • FileUtils
  • Hooks
  • Installation
  • Label
  • Mode
  • Popup
  • ProductFeatures
  • Report
  • Stage
  • Wizard
  • XML

Global Functions

Local Functions

global setClientPrefix (string prefix) -> void

Set Client Prefix

Parameters:
prefix
global EnableModule (string modname) -> list<string>

Enable given disabled module

Parameters:
modname
Return value:
current list of disabled modules
global DisableModule (string modname) -> list<string>

Disable given module in installation workflow

Parameters:
modname
Return value:
current list of disabled modules
global GetDisabledModules () -> list <string>

Returns list of modules disabled in workflow

Return value:
DisabledModules
global EnableProposal (string enable_proposal) -> list<string>

Enable given disabled proposal

Parameters:
enable_proposal
Return value:
current list of disabled proposals
global DisableProposal (string disable_proposal) -> list<string>

Disable given proposal in installation workflow

Parameters:
disable_proposal
Return value:
current list of disabled proposals
global GetDisabledProposals () -> list <string>

Returns list of proposals disabled in workflow

Return value:
DisabledProposals
global checkDisabled (map mod) -> boolean

Check if a module is disabled

Parameters:
mod
global ReadControlFile (string controlfile) -> boolean

Read XML Control File

Parameters:
controlfile
global checkArch (map mod, map def) -> boolean

Check if valid architecture

Parameters:
mod
def
Return value:
true if arch match
local getClientName (string name, string execute) -> string

Returns name of the script to call. If 'execute' is defined, the client name is taken from there. Then, if a custom control file is defined, client name is defined as 'name'. Then, inst_'name' or just 'name' is returned if it does not match the 'inst_' regexp.

Parameters:
name
execute
See
custom_control_file
global getClientTerm (map step, map def, any former_result) -> term

Return term to be used to run module with CallFunction

Parameters:
step
def
former_result
Return value:
module data with params
local CheckAdditionalParams (map & check_workflow) -> boolean

Checks all params set by SetAdditionalWorkflowParams() whether they match the workfow got as parameter.

Parameters:
check_workflow
See
SetAdditionalWorkflowParams()
local FindMatchingWorkflow (string stage, string mode) -> map

Returns workflow matching the selected stage and mode and additiona parameters if set by SetAdditionalWorkflowParams()

Parameters:
stage
mode
Return value:
workflow
global getModeDefaults (string stage, string mode) -> map

Get workflow defaults

Parameters:
stage
mode
Return value:
defaults
local PrepareScripts (map m) -> void

Prepare Workflow Scripts

Parameters:
m Workflow module map
global RequiredFiles (string stage, string mode) -> list<string>

Get list of required files for the workflow.

Parameters:
stage
mode
Return value:
Required files list.
global getCompleteWorkflow (string stage, string mode) -> map

Get Workflow

Parameters:
stage Stage
mode Mode
Return value:
Workflow map
global getModules (string stage, string mode, symbol which) -> list <map>

Get modules of current Workflow

Parameters:
stage
mode
which
Return value:
modules
global RunRequired (string stage, string mode) -> boolean

Returns whether is is required to run YaST in the defined stage and mode

Parameters:
stage
mode
Return value:
if needed
global getWorkflowLabel (string stage, string mode, string wz_td) -> string

Get Workflow Label

Parameters:
stage
mode
wz_td
global AddWizardSteps (list<map> stagemode) -> void

Add Wizard Steps

Parameters:
stagemode
global InitAutomaticConfiguration () -> void

Inits the default value for use_automatic_configuration

global SetUseAutomaticConfiguration (boolean set_param) -> void

Adjust the automatic configuration to be either enabled or disabled. Enabling it means that second stage will be disabled.

Parameters:
set_param
global GetUseAutomaticConfiguration () -> boolean

Returns whether automatic configuration will be enabled.

Return value:
if enabled
global UpdateWizardSteps (list<map> stagemode) -> void

Update Steps

Parameters:
stagemode
global RetranslateWizardSteps () -> void

Retranslate Wizard Steps

global getProposals (string stage, string mode, string proptype) -> list < list >

Get modules of current Workflow

Parameters:
stage
mode
proptype
Return value:
modules
global getLockedProposals (string stage, string mode, string proptype) -> list<string>

Get Proposal list that can not be changed by the user.

Parameters:
stage
mode
proptype
Return value:
list of locked proposals
global getProposalTextDomain () -> string

Return text domain

global getProposalProperties (string stage, string mode, string proptype) -> map

Return proposal Label

Parameters:
stage
mode
proptype
global Init () -> boolean

Initialize Product Control

Return value:
True on success
local retranslateWizardDialog () -> void

Re-translate static part of wizard dialog and other predefined messages after language change

Info:

If workflow module is marked as optional, skip if it returns nil, For example, if it is not installed.

global Run () -> symbol

Run Workflow

global SkippedSteps () -> list<map>

List steps which were skipped since last restart of YaST

Return value:
a list of maps describing the steps
global RestartingStep () -> map

Return step which restarted YaST (or rebooted the system)

Return value:
a map describing the step
global ProductControl () -> void

ProductControl Constructor

global SetAdditionalWorkflowParams (map <string, any> params) -> void

Sets additional params for selecting the workflow

Parameters:
params
Example
 SetAdditionalWorkflowParams ($["add_on_mode":"update"]);
 SetAdditionalWorkflowParams ($["add_on_mode":"installation"]);
global ResetAdditionalWorkflowParams () -> void

Resets all additional params for selecting the workflow

See
SetAdditionalWorkflowParams()