PackageSlideShow.ycp Purpose: Module to access slides from installation repository |
|
This module has an unstable interface. |
Get version info for a package (without build no.)
- Parameters:
-
pkg_name name of the package without path and ".rpm" extension
- Return value:
-
version string
Get package file name from path
- Parameters:
-
pkg_name location of the package
- Return value:
-
package file name
set media type "CD" or "DVD"
- Parameters:
-
new_media_type
Sum up all list items
- Parameters:
-
sizes
Sum up all positive list items, but cut off individual items at a maximum value. Negative return values indicate overflow of any individual item at "max_cutoff". In this case, the absolute value of the return value is "max_cutoff" * number of overflows. (e.g. >2hour + >2hours + 1:13:20 => >4hours
- Parameters:
-
sizes max_cutoff
Format an integer seconds value with min:sec or hours:min:sec
- Parameters:
-
seconds
Format number of remaining bytes to be installed as string.
- Parameters:
-
remaining bytes remaining, -1 for 'done'
- Return value:
-
human readable remaining time or byte / kB/ MB size
Format number of remaining packages to be installed as string.
- Parameters:
-
remaining bytes remaining, -1 for 'done'
- Return value:
-
human readable remaining time or byte / kB/ MB size
Perform sanity check for correct initialzation etc.
- Parameters:
-
silent don't complain in log file
- Return value:
-
true if OK, false if any error
Update internal bookkeeping: subtract size of one package from the global list of remaining sizes per CD
- Parameters:
-
pkg_size
Initialize internal pacakge data, such as remaining package sizes and times. This may not be called before the pkginfo server is up and running, so this cannot be reliably done from the constructor in all cases.
- Parameters:
-
force true to force reinitialization
Try to figure out what media will be needed next and set next_src_no and next_cd_no accordingly.
Set the current repository and CD number. Must be called for each CD change. src_no: 1...n cd_no: 1...n
- Parameters:
-
src_no cd_no
Recalculate remaining times per CD based on package sizes remaining and data rate so far. Recalculation is only done each 'recalc_interval' seconds unless 'force_recalc' is set to 'true'.
- Parameters:
-
force_recalc force recalculation even if timeout not reached yet
- Return value:
-
true if recalculated, false if not
Switch unit to seconds if necessary and recalc everything accordingly.
- Return value:
-
true if just switched from sizes to seconds, false otherwise
Update progress widgets for the current CD: Label and ProgressBar. Use global statistics variables for that.
- Parameters:
-
silent_check
Update progress widgets
- Parameters:
-
silent_check
Returns a table widget item list for CD statistics
Progress display update This is called via the packager's progress callbacks.
- Parameters:
-
pkg_percent package percentage
Update progress widgets for all CDs. Uses global statistics variables.
- Parameters:
-
silent_check
Return a CD's progress bar ID
- Parameters:
-
src_no number of the repository (from 0 on) cd_no number of the CD within that repository (from 0 on)
package start display update - this is called at the end of a new package
- Parameters:
-
pkg_name package name pkg_size deleting Flag: deleting (true) or installing (false) package?
package start display update - this is called at the beginning of a new package
- Parameters:
-
pkg_name package name pkg_summary package summary (short description) pkg_size deleting Flag: deleting (true) or installing (false) package?
Package providal start
- Parameters:
-
pkg_name sz remote