YaST2 Developers Documentation: AddOnProduct

AddOnProduct

AddOnProduct.ycp
This module provides integration of the add-on products

This module has an unstable interface.

Imports

  • FileUtils
  • InstShowInfo
  • Label
  • Language
  • Mode
  • Popup
  • ProductControl
  • ProductFeatures
  • Report
  • Wizard
  • XML

Global Variables

Global Functions

Local Variables

Local Functions

local src_cache_id -> integer

ID for cache in the inst-sys

local system_proposals_prepared -> boolean

System proposals have already been prepared for merging?

local system_workflows_prepared -> boolean

System workflows have already been prepared for merging?

global add_on_products -> list<map<string,any> >

List of all selected sources

global src_id -> integer

ID of currently added source for the add-on product

global last_ret -> symbol

return value of last step in the product adding workflow

global control_files_to_add -> list<string>

List of used control files, to be copied to target system

global finish_steps_before_chroot -> list<string>

Items if add-on product to be performed at the start of inst_finish

global finish_steps_after_chroot -> list<string>

Items of add-on product to be performed after swictching to chroot

global finish_steps_before_umount -> list<string>

Items of add-on product to be performed before unmounting disks

global UpdateInstSys (string filename) -> boolean

Adapts the inst-sys from the tarball

Parameters:
filename string the filename with the tarball to use to the update
Return value:
true on success
local PrepareProposals (list<map> proposals) -> list<map>

Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals

Parameters:
proposals a list of proposals
Return value:
a list of updated proposals
local PrepareSystemProposals () -> void

Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals. Works with base product proposals.

local PrepareWorkflows (list<map> workflows) -> list<map>

Check all workflows, split those ones which have multiple modes or architectures or stages into multiple workflows

Parameters:
workflows a list of workflows
Return value:
a list of updated workflows
local PrepareSystemWorkflows () -> void

Check all workflows, split those ones which have multiple modes or architectures or stages into multiple worlflows. Works with base product workflows.

local ReplaceProposalModule (map proposal, string old, list<string> new) -> map

Replace a module in a proposal with a set of other modules

Parameters:
proposal a map describing the proposal
old string the old item to be replaced
new a list of items to be put into instead of the old one
Return value:
a map with the updated proposal
local MergeProposal (map base, map addon, string prod_name, string domain) -> map

Merge add-on proposal to a base proposal

Parameters:
base map the base product proposal
addon map the proposal of the addon productA
prod_name a name of the add-on product
domain
Return value:
merged proposals
local UpdateProposals (list<map> proposals, string prod_name, string domain) -> boolean

Update system proposals according to proposal update metadata

Parameters:
proposals a list of update proposals
prod_name string the product name (used in case of tabs)
domain string the text domain (for translations)
Return value:
true on success
local ReplaceWorkflowModule (map workflow, string old, list<map> new, string domain, boolean keep) -> map

Replace a module in a workflow with a set of other modules

Parameters:
workflow a map describing the workflow
old string the old item to be replaced
new a list of items to be put into instead of the old one
domain string a text domain
keep boolean true to keep original one (and just insert before)
Return value:
a map with the updated workflow
local MergeWorkflow (map base, map addon, string prod_name, string domain) -> map

Merge add-on workflow to a base workflow

Parameters:
base map the base product workflow
addon map the workflow of the addon product
prod_name a name of the add-on product
domain
Return value:
merged workflows
local UpdateWorkflows (list<map> workflows, string prod_name, string domain) -> boolean

Update system workflows according to workflow update metadata

Parameters:
workflows a list of update workflows
prod_name string the product name (used in case of tabs)
domain string the text domain (for translations)
Return value:
true on success
local RedrawWizardSteps () -> boolean

Redraw the wizard steps bar

Return value:
true on success
local UpdateInstFinish (map<string,list<string> > additional_steps) -> boolean

Add specified steps to inst_finish Just modifies internal variables, inst_finish grabs them itself

Parameters:
additional_steps a map specifying the steps to be added
Return value:
true on success
local UpdateInstallation (map update_file, string name, string domain) -> boolean

Adapts the installation workflow according to specified XML file

Parameters:
update_file a map containing the add-on product control file
name string the name of the add-on product
domain string the text domain for the add-on product
Return value:
true on success
local AddNewProposals (list<map> proposals) -> boolean

Add new defined proposal to the list of system proposals

Parameters:
proposals a lsit of proposals to be added
Return value:
true on success
local Replaceworkflows (list<map> workflows) -> boolean

Replace workflows for 2nd stage of installation

Parameters:
workflows a list of the workflows
Return value:
true on success
local UpdateProductInfo (map update_file) -> boolean

Update product options

Parameters:
update_file a map containing update control file
Return value:
true on success
local CleanY2Update () -> void

Remove the /y2update directory from the system

local DisplayLicenseDialog (string license_file) -> boolean

Displays License with Help and ( ) Yes / ( ) No radio buttons

Parameters:
license_file
Return value:
if succeeded
local CleanUpLicense (string tmpdir) -> void

Removes the temporary directory for licenses

Parameters:
tmpdir
global AcceptedLicenseAndInfoFile (integer src_id) -> boolean

Show /media.1/info.txt file in a pop-up message if such file exists. Show license if such exists and return whether users accepts it. Returns 'nil' when did not succed.

Parameters:
src_id
Return value:
whether the license has been accepted
global DoInstall () -> symbol

Do installation of the add-on product within an installed system srcid is got via AddOnProduct::src_id

Return value:
the result symbol from wizard sequencer
global WFIntegrate (string filename) -> boolean

Integrate the changes in the workflow

Parameters:
filename string filename of the control file (local filename)
Return value:
true on success
global Integrate (integer srcid) -> boolean

Integrate the add-on product to the installation workflow, including preparations for 2nd stage and inst-sys update

Parameters:
srcid integer the source ID of the installation source
Return value:
true on success
global AddPreselectedAddOnProducts (string filelist) -> boolean

Auto-integrate add-on products in specified file

Parameters:
filelist string a file containing a list of add-on products to integrate
Return value:
true on exit