2. AddOnCreator

2.1. Authors

    2.2. Summary of Module Globals

    List of Global Functions

    List of Global Variables

    • add_on_products - list of all configured AddOn products

    • bootable - if final Add-On should be bootable (feature not implemented)

    • clone - if we have 'source add-on' to base the new one on

    • content - variables from content file + their description

    • content_key - argument for any_xml agent: key indicating content of element without attributes

    • current_product - map of the Add-On product currently in use

    • generate_descriptions - if the descriptions of packages should be generated (false have only sense when cloning where they could be read from description files of cloned product)

    • import_path - path to directory with existing product (which is being cloned)

    • modified - Data was modified?

    2.3. Global Functions

    2.3.1. BuildAddOn

    Write all add-on-creator settings

    Return value

    • boolean - true on success

    2.3.2. CommitCurrentProduct

    save the data with current configuration into global list + reset the current product map

    Return value

    • void

    2.3.3. CopyRPMs

    Copy the packages from the source directory to target

    Function parameters

    • string in_path

    • string base_path

    Return value

    • boolean - success

    2.3.4. CreateAddOnStructure

    Create the directory structure of the Add-On

    Function parameters

    • string base_path

    Return value

    • boolean - success

    2.3.5. CreateDirectoryYaSTFiles

    Create directory.yast files (the last step)

    Function parameters

    • string base_path

    Return value

    • boolean - success

    2.3.6. CreateISOImage

    Create an ISO image of the product

    Function parameters

    • string dir_path

    • string iso_p

    • string name

    Return value

    • boolean

    2.3.7. CreateMD5SUMS

    Create MD5SUMS files

    Function parameters

    • string base_path

    Return value

    • boolean - success

    2.3.8. Export

    Export the settings about current Add-On product

    Return value

    • map

    2.3.9. GenerateArchiveFiles

    Generate ARCHIVES.gz, INDEX.gz and ls-lR.gz

    Function parameters

    • string base_path

    Return value

    • boolean

    2.3.10. GenerateDirectories

    generate the paths of media, data and description dirs

    Function parameters

    • string base_path

    Return value

    • void

    2.3.11. GenerateGPGKey

    Generate the key pair

    Function parameters

    • map<string,string> data

    Return value

    • string

    2.3.12. GeneratePackageDescriptions

    Generate the package descriptions using create_package_descr

    Return value

    • boolean

    2.3.13. GenerateReleasePackage

    Use BuildService tools to create -release package with product info

    Function parameters

    • string base_path

    Return value

    • boolean

    2.3.14. GetKeyUID

    read the user's ID for given GPG key

    Function parameters

    • string key

    Return value

    • string

    2.3.15. GetProductInfo

    Get the map describing product.xml and produce better readable YCP map

    Function parameters

    • map xml

    • boolean merge_with_current

    Return value

    • map<string,map>

    2.3.16. ImportExistingProduct

    import the data from existing add-on

    Function parameters

    • string dir_path

    Return value

    • boolean

    2.3.17. Modified

    Data was modified?

    Return value

    • boolean - true if modified

    2.3.18. PrepareBuild

    prepare the data of current product for a build (neccessary because input packages could get changed)

    Return value

    • boolean

    2.3.19. Read

    Initialize the settings for add-on-creator

    Return value

    • boolean - true on success

    2.3.20. ReadPatternsFile

    read all the patterns defined in given file

    Function parameters

    • string file_path

    Return value

    • list<map> - of pattern maps

    2.3.21. ReadProductXML

    import the data from given xml file

    Function parameters

    • string prod_file_path

    Return value

    • map<string,any>

    2.3.22. ResetCurrentProduct

    Reset all settings related to current product

    Return value

    • void

    2.3.23. SignAddOn

    Sign current Add-On product

    Function parameters

    • string base_path

    • string key

    Return value

    • boolean

    2.3.24. UpdateContentMap

    Take list of content-file data and update global content_map. If argument is empty, global 'content' list is used as an input.

    Function parameters

    • list<map> content_list

    Return value

    • map<string,string>

    2.3.25. Write

    Write all AddOn products configurations

    Return value

    • boolean

    2.3.26. WriteContentFile

    Write the content file

    Function parameters

    • string base_path

    • list<map> content_data

    Return value

    • boolean - success

    2.3.27. WriteLicensesFiles

    Write the text of available licenses to correct places

    Function parameters

    • string descr_path

    • string base_path

    • map<string,string> files

    Return value

    • boolean

    2.3.28. WriteMediaFiles

    Write the media.n/media files

    Function parameters

    • string base_path

    • list<string> m_files

    • string next

    Return value

    • boolean - success

    2.3.29. WritePackageDescriptions

    Write the package descriptions edited by user

    Function parameters

    • string descr_path

    • map descr

    Return value

    • boolean

    2.3.30. WritePatchesFiles

    Create the patches files

    Function parameters

    • string base_path

    • list<string> p_files

    Return value

    • boolean - success

    2.3.31. WritePatterns

    Write all files with patterns definitions

    Function parameters

    • string descr_path

    • string base_path

    Return value

    • boolean

    2.3.32. WriteProductsFiles

    Create the products file TODO editor - see ExpertSettingsDialog3

    Function parameters

    • string base_path

    • list<string> p_files

    Return value

    • boolean - success

    2.3.33. WriteStringFiles

    Write the readme/COPYING/COPYRIGHT... files in base_path

    Function parameters

    • string base_path

    • map<string,string> files

    Return value

    • boolean - success

    2.4. Global Variables

    2.4.1. add_on_products

    list of all configured AddOn products

    2.4.2. bootable

    if final Add-On should be bootable (feature not implemented)

    2.4.3. clone

    if we have 'source add-on' to base the new one on

    2.4.4. content

    variables from content file + their description

    2.4.5. content_key

    argument for any_xml agent: key indicating content of element without attributes

    2.4.6. current_product

    map of the Add-On product currently in use

    2.4.7. generate_descriptions

    if the descriptions of packages should be generated (false have only sense when cloning where they could be read from description files of cloned product)

    2.4.8. import_path

    path to directory with existing product (which is being cloned)

    2.4.9. modified

    Data was modified?

    2.5. Module Requirements

    2.5.1. Module Imports

    • Arch
    • Directory
    • FileUtils
    • Label
    • Mode
    • Package
    • PackageSystem
    • PackagesDescr
    • Progress
    • Report
    • String

    2.5.2. Module Includes