247. SpaceCalculation

247.1. Authors

  • Klaus Kaempf (kkaempf@suse.de)

  • Gabriele Strattner (gs@suse.de)

  • Stefan Schubert (schubi@suse.de)

  • Purpose: Package installation functions usable

  • when the installation media is available

  • on Installation::sourcedir

247.2. Summary of Module Globals

List of Global Functions

  • CheckDiskFreeSpace - Check, if there is enough free space after installing the current selection

  • EvaluateFreeSpace - Evaluate the free space on the file system. Runs the command "df" and creates a map containig information about used and free space on every partition. Free space is calculated respecting the spare_percentage given in second argument.

List of Global Variables

    247.3. Global Functions

    247.3.1. CheckDiskFreeSpace

    Check, if there is enough free space after installing the current selection

    Function parameters

    • integer free_percent

    • integer max_unsufficient_free_size

    Return value

    • list<map> - of partitions which have less than free_percent free size

    247.3.2. EvaluateFreeSpace

    Evaluate the free space on the file system. Runs the command "df" and creates a map containig information about used and free space on every partition. Free space is calculated respecting the spare_percentage given in second argument.

    Function parameters

    • integer spare_percentage

    Return value

    • list<map<string,any> > - partition list, e.g. [$["free":389318, "name":"/", "used":1487222], $["free":1974697, "name":"usr", "used":4227733]]

    Example 86. 

     EvaluateFreeSpace ( 5 );
    
     ***  This is needed during update !


    247.4. Global Variables

    247.5. Module Requirements

    247.5.1. Module Imports

    • Installation
    • Mode
    • ProductFeatures
    • Report
    • Stage
    • String

    247.5.2. Module Includes