YaST2 Developers Documentation:

OSR.ycp
Control of the automatic scan and repair sequence.

This module has an unstable interface.

Imports

  • Linuxrc
  • Mode
  • OSRCommon
  • OSRDirect
  • OSRLogFile
  • OSRMode
  • OSRProgress
  • OSRStatus
  • OSRSummary
  • Report
  • Stage

Includes

  • repair/osr_module_bootloader.ycp
  • repair/osr_module_init.ycp
  • repair/osr_module_packages.ycp
  • repair/osr_module_partition.ycp

Global Variables

Global Functions

Local Variables

Local Functions

local global_provides_list -> list<string>

Only for define ComputesDetectMethodSequence ! not global.

local index_modules -> integer

Only for define Detect. Contains the current module index. osrmodule_init -> 0 osr_module_partition -> 1 osr_module_grub -> 2

local index_detect -> integer

Only for define Detect. Contains the current detection method index of a module. OSRPartitionCheckMBR ->0 OSRPartitionCheckDisks -> 1 ..

local static_provides -> map

Static global_provides entries for all detection methods. $["root_mountpoint":"/mnt"]

local module_detection_methods -> map

A map with all lists of detect-methods-entries. The function-names have to be enclosed in double-quoted braces! $["osr_module_init":[ $["group":"init", "method": ``OSRInitInit(), "progress":10, "provides":["has_floppy"], "requires":[], "summary":"Probing floppy"], $["group":"init", "method": ``OSRInitFloppy(), "progress":10, "provides":["repair_target"], "requires":[], "summary":"Init target system"]], "osr_module_partition":[ $["group":"mbr_check", "method":``OSRPartitionMBR(), "progress":10, "provides":["valid_target"], "requires":["repair_target"], "summary":"Searching for harddisks"], ] ...

local module_reset_methods -> map

Contains all reset method descriptions. Need to reset settings for a scan and repair sequence.

local module_sequence -> list<string>

Sequence of all rescue (detect and repair) modules

local module_maps -> map

Date of all rescue modules

global next_detect_method -> string

Allowed back jump in a scan and repair sequence error appear.

local max_index_detect_loop -> integer

Maximal execution of a detect function. (The proper meaning is "do not run max_index_detect_loop-times", so the variable means "maximal execution + 1")

global Reset () -> void

Reset all.

global ResetDetect () -> void

Reset detect settings.

global ResetDetectGroupList () -> void

set OSRCommon::detect_group_list to []

global SizeDetectGroupList () -> integer

return size of OSRCommon::detect_group_list

global SetDetectGroupList (list<string> gl) -> void

set new value for OSRCommon::detect_group_list

Parameters:
gl
global DetectGroupList () -> list<string>

get value of OSRCommon::detect_group_list

local ComputesDetectMethodSequence (string module_name) -> list<map>

Computes the sequence of the detection methods of a module.

Parameters:
module_name
local ComputeModuleSequence (list<string> module_name_list) -> boolean

This method resolves the requirements and provides of the modules and computes the correct sequence of detection modules.

Parameters:
module_name_list
Return value:
True if the module sequence was successfully created.
global Init () -> boolean

This method initializes the YaST OS Repair system. It is started at first and builds the main window, initializes the global osr_map and a lot of other data.

For internal use only.

Return value:
True if the initialization progress succeeded.
global osr_empty () -> boolean

Empty term.

local forall_groups_names () -> list<string>

Return a list of string with group names executed at the beginning of every Detect sequence.

local all_groups_selected () -> boolean

Returns if all detection groups are selected for detection.

local requires_not_provided (list<string> requires) -> boolean

Returns true if the specified requires argument is not provided (not in the map global_provides).

Parameters:
requires
local requires_in_detection_group (list<string> requires) -> boolean

Returns true if all specified requires are supported from the selected detection groups.

Parameters:
requires
local skip_detect_method (map method_map) -> boolean

Returns true if a detect method is not a member of a slected detection group. Skip detection.

Parameters:
method_map
global ResetDetectionModules () -> boolean

Reset the temporary changes. e.g.: Umount temporary mounted partitions ...

local back2status_detect_method_name () -> boolean

Go back to a previous detection method. e.g. if a error can not repaired.

local DetectionMethodesCount () -> integer

Count of all detection methods.

local detect () -> symbol

This is the main detection method. It looks for the module_sequence and executes all detection methods from the forthcoming modules.

Return value:
True if the detection progress succeeded.
global Detect () -> symbol

Start detection loop.

local SortGroupSequence (map groups) -> list<map>

Sort the sequence of all detection methods of the specified group.

Parameters:
groups
local ResetMethodesCount () -> integer

Count of all reset Methods.

global GroupItems (boolean mode) -> list<term>

Build item list with all group items.

Parameters:
mode if all entries should be checked ('Select all')
global CheckGroupRequires () -> list<string>

check the dependencies for seleced detect groups

global SetReboot () -> void

Prepare for reboot system