Unknown YCP Module |
This module has an unstable interface. |
File: PackagesProposal.ycp
Package: Packages installation
Summary: API for selecting or de-selecting packages for installation
Authors: Lukas Ocilka
Structure $[
"unique_ID" : $[ `package : [ "list", "of", "packages", "to", "install" ], `pattern : [ "list", "of", "patterns", "to", "install" ], ] ]
Resets all resolvables to install. Use carefully.
List of currently supported types of resolvables
Returns list of resolvables currently supported by this module.
- Return value:
-
of resolvables
- Example
-
GetSupportedResolvables() -> [`package, `pattern, ... ]
Checks the currently created data structure and creates missing keys if needed.
- Parameters:
-
unique_ID type
Checks parameters for global functions
- Parameters:
-
unique_ID type
- Return value:
-
if parameters are correct
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
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
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
Returns all resolvables selected for installation.
- Parameters:
-
unique_ID type
- Return value:
-
of resolvables
- Example
-
GetResolvables ("y2_kdump", `package) -> ["yast2-kdump", "kdump"]
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
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"], ]
Return whether a unique ID is already in use.
- Parameters:
-
unique_ID
- Return value:
-
whether the ID is not in use yet