YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Structures

Global Functions

Local Variables

Local Functions

Info:

File: PackagesProposal.ycp Package: Packages installation Summary: API for selecting or de-selecting packages for installation Authors: Lukas Ocilka

local resolvables_to_install -> map <string, map <symbol, list <string> > >

Structure $[

     "unique_ID" : $[
         `package : [ "list", "of", "packages", "to", "install" ],
         `pattern : [ "list", "of", "patterns", "to", "install" ],
     ]
 ]
global ResetAll () -> void

Resets all resolvables to install. Use carefully.

local supported_resolvables -> list <symbol>

List of currently supported types of resolvables

global GetSupportedResolvables () -> list <symbol>

Returns list of resolvables currently supported by this module.

Return value:
of resolvables
Example
 GetSupportedResolvables() -> [`package, `pattern, ... ]
local CreateEmptyStructureIfMissing (string unique_ID, symbol type) -> void

Checks the currently created data structure and creates missing keys if needed.

Parameters:
unique_ID
type
local CheckParams (string unique_ID, symbol type) -> boolean

Checks parameters for global functions

Parameters:
unique_ID
type
Return value:
if parameters are correct
global AddResolvables (string unique_ID, symbol type, list <string> resolvables) -> boolean

Adds list of resolvables to pool that is then used by software proposal to propose a selection of resolvables to install.

Parameters:
unique_ID
type
resolvables
Return value:
whether successful
Example

  AddResolvables ("y2_kdump", `package, ["yast2-kdump", "kdump"]) -> true
  // `not_supported is definitely not a supported resolvable
  AddResolvables ("test", `not_supported, ["bash"]) -> false
See
supported_resolvables RemoveResolvables()
global SetResolvables (string unique_ID, symbol type, list <string> resolvables) -> boolean

Replaces the current resolvables with new ones. Similar to AddResolvables() but it replaces the list of resolvables instead of adding them to the pool. It always replaces only the part that is identified by the unique_ID.

Parameters:
unique_ID
type
resolvables
Return value:
whether successful
global RemoveResolvables (string unique_ID, symbol type, list <string> resolvables) -> boolean

Removes list of packages from pool that is then used by software proposal to propose a selection of resolvables to install.

Parameters:
unique_ID
type
resolvables
Return value:
whether successful
Example

  RemoveResolvables ("y2_kdump", `package, ["kdump"]) -> true
See
supported_resolvables AddResolvables()
global GetResolvables (string unique_ID, symbol type) -> list <string>

Returns all resolvables selected for installation.

Parameters:
unique_ID
type
Return value:
of resolvables
Example

   GetResolvables ("y2_kdump", `package) -> ["yast2-kdump", "kdump"]
global GetAllResolvables (symbol type) -> list <string>

Returns list of selected resolvables of a given type

Parameters:
type
Return value:
list of resolvables
Example

   GetAllResolvables (`package) -> ["list", "of", "packages"]
   GetAllResolvables (`pattern) -> ["list", "of", "patterns"]
   // not a supported resolvable type
   GetAllResolvables (`unknown) -> nil
See
supported_resolvables
global GetAllResolvablesForAllTypes () -> map <symbol, list <string> >

Returns all selected resolvables for all supported types

Structure $[

   `resolvable_type : [ "list", "of", "resolvables" ],
   `another_type    : [ "list", "of", "resolvables" ],
 ]
Return value:
map of resolvables
Example

 // No resolvables selected
 GetAllResolvablesForAllTypes() -> $[]
 // Only patterns selected
 GetAllResolvablesForAllTypes() -> $[`pattern : ["some", "patterns"]]
 // Also packages selected
 GetAllResolvablesForAllTypes() -> $[
   `pattern : ["some", "patterns"],
   `package : ["some", "packages"],
 ]
global IsUniqueID (string unique_ID) -> boolean

Return whether a unique ID is already in use.

Parameters:
unique_ID
Return value:
whether the ID is not in use yet