Base |
modules/InstExtensionImage.ycp |
Functionality for downloading and merging extending images for the inst-sys | |
|
|
This module has an unstable interface. |
This module provides functions that download inst-sys extension images
(localization, fonts, ...) and merge them to the current int-sys.
This enables inst-sys to be modular even for already running YaST.
See FATE #302955: 'Split translations out of installation system'.
This module is strictly installation-only!
Imports
Global FunctionsLocal Functions |
local
MergeURLsParams (string base_url, string url_with_modifs)
->
string
Merges two different URLs, repspectively their parameters to one string with parameters. See the example.
- Parameters:
-
base_url url_with_modifs
- Return value:
-
merged params
- Example
-
MergeURLsParams ( "http://server.net/dir/?param1=x¶m2=y", "http://server.net/dir/?param2=z¶m3=a", // param2 from the first URL has been replaced by tho one from the second URL ) -> "param1=x¶m2=z¶m3=a"
local
CutLastDirOrFile (string url)
->
string
Removes the last url item.
- Parameters:
-
url
- Example
-
CutLastDirOrFile ("http://server/some/dir/") -> "http://server/some/" CutLastDirOrFile ("http://server/some/dir") -> "http://server/some/"
local
MergeURLs (string url_base, string url_with_modifs)
->
string
Merges two URLs into one and removes parameters from both. If the second URL is strictly relative, e.g., "boot/i386/root", it is merged with the first one, otherwise the second one is returned (with params cut).
- Parameters:
-
url_base url_with_modifs
- Return value:
-
merged URL
- Example
-
MergeURLs ( "nfs://server.name/11-repo/?device=eth0&xxx=zzz", "boot/i386/root?device=eth1&aaa=bbb" ) -> "nfs://server.name/11-repo/boot/i386/" MergeURLs ( "nfs://server.name/11-repo/?device=eth0&xxx=zzz", "nfs://server2.net/boot/i386/root?device=eth1&aaa=bbb" ) -> "nfs://server2.net/boot/i386/"
local
LazyInit ()
->
void
Every global function should call LazyInit in the beginning.
global
LoadExtension (string package, string message)
->
boolean
Load a rpm package from the media into the inst-sys
- Parameters:
-
package The path to package to be loaded (by default, the package is expected in the /boot/ / directory of the media message The message to be shown in the progress popup
global
UnLoadExtension (string package, string message)
->
boolean
Remove given package from the inst-sys
- Parameters:
-
package The path to package to be unloaded (by default, the package is expected in the /boot/ / directory of the media message The message to be shown in the progress popup