YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Imports

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

Global Variables

Global Functions

Local Variables

Local Functions

Info:

File: modules/AddOnCreator.ycp Package: Configuration of add-on-creator Summary: AddOnCreator settings, input and output functions Authors: Jiri Suchomel

$Id: AddOnCreator.ycp 59618 2009-11-19 13:46:40Z jsuchome $

local add_on_products_file -> string

where the configurations are stored

global add_on_products -> list<map>

list of all configured AddOn products

global current_product -> map

map of the Add-On product currently in use

global content -> list<map>

variables from content file + their description

global clone -> boolean

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

global import_path -> string

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

global generate_descriptions -> boolean

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)

global bootable -> boolean

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

global modified -> boolean

Data was modified?

global content_key -> string

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

global Modified () -> boolean

Data was modified?

Return value:
true if modified
global ReadProductXML (string prod_file_path) -> map<string,any>

import the data from given xml file

Parameters:
prod_file_path
global GetProductInfo (map xml, boolean merge_with_current) -> map<string,map>

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

Parameters:
xml map as read from xml file (from ReadProductXML)
merge_with_current
global UpdateContentMap (list<map> content_list) -> map<string,string>

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

Parameters:
content_list
global GenerateGPGKey (map<string,string> data) -> string

Generate the key pair

Parameters:
data
global Read () -> boolean

Initialize the settings for add-on-creator

Return value:
true on success
local uncompress_file (string file_path) -> string

Take a path to compressed file as argument and return path to uncompressed one\

Parameters:
file_path
global ReadPatternsFile (string file_path) -> list<map>

read all the patterns defined in given file

Parameters:
file_path
Return value:
of pattern maps
global ImportExistingProduct (string dir_path) -> boolean

import the data from existing add-on

Parameters:
dir_path
local create_argument_lists (string stdout) -> list<string>

converts the output of find command (=possibly big string with each file on one line), to the list of smaller strings (<128kB), each with space separated file names

Parameters:
stdout output of find command
global WriteContentFile (string base_path, list<map> content_data) -> boolean

Write the content file

Parameters:
base_path
content_data
Return value:
success
global WriteStringFiles (string base_path, map<string,string> files) -> boolean

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

Parameters:
base_path
files
Return value:
success
global GenerateDirectories (string base_path) -> void

generate the paths of media, data and description dirs

Parameters:
base_path
global CreateAddOnStructure (string base_path) -> boolean

Create the directory structure of the Add-On

Parameters:
base_path
Return value:
success
global GeneratePackageDescriptions () -> boolean

Generate the package descriptions using create_package_descr

global WritePackageDescriptions (string descr_path, map descr) -> boolean

Write the package descriptions edited by user

Parameters:
descr_path
descr
global GenerateArchiveFiles (string base_path) -> boolean

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

Parameters:
base_path path to base output directory
global WritePatchesFiles (string base_path, list<string> p_files) -> boolean

Create the patches files

Parameters:
base_path path to base output directory
p_files
Return value:
success
global WriteProductsFiles (string base_path, list<string> p_files) -> boolean

Create the products file TODO editor - see ExpertSettingsDialog3

Parameters:
base_path path to base output directory
p_files
Return value:
success
global WriteMediaFiles (string base_path, list<string> m_files, string next) -> boolean

Write the media.n/media files

Parameters:
base_path path to base output directory
m_files list of media files contents
next content of nextmedia file
Return value:
success
global WriteLicensesFiles (string descr_path, string base_path, map<string,string> files) -> boolean

Write the text of available licenses to correct places

Parameters:
descr_path
base_path full path to base output directory
files
global WritePatterns (string descr_path, string base_path) -> boolean

Write all files with patterns definitions

Parameters:
descr_path
base_path path to base output directory
global CopyRPMs (string in_path, string base_path) -> boolean

Copy the packages from the source directory to target

Parameters:
in_path source path
base_path destination directory
Return value:
success
global GenerateReleasePackage (string base_path) -> boolean

Use BuildService tools to create -release package with product info

Parameters:
base_path
local WriteWorkflow (string base_path, string desc_path, list<string> packages, string y2update_p) -> boolean

Write the modification of installation workflow

Parameters:
base_path path to base output directory
desc_path path to workflow description file
packages list with paths of packages to be included in y2update.tgz
y2update_p
local GenerateChangelog (string base_path) -> boolean

Generate Changelog for the product

Parameters:
base_path base output path
local WriteServicepackArchive (string base_path) -> boolean

Generate servicepack.tar.gz archive for bootable media

Parameters:
base_path base output path
global CreateMD5SUMS (string base_path) -> boolean

Create MD5SUMS files

Parameters:
base_path
Return value:
success
local AskForPassphrase (string message, boolean failure) -> string

Report the error with failed gpg and ask for possible new entering of pw

Parameters:
message
failure
global SignAddOn (string base_path, string key) -> boolean

Sign current Add-On product

Parameters:
base_path path to target product directory
key GPG key to sign with
global CreateDirectoryYaSTFiles (string base_path) -> boolean

Create directory.yast files (the last step)

Parameters:
base_path
Return value:
success
global CreateISOImage (string dir_path, string iso_p, string name) -> boolean

Create an ISO image of the product

Parameters:
dir_path
iso_p
name
global ResetCurrentProduct () -> void

Reset all settings related to current product

global CommitCurrentProduct () -> void

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

global Write () -> boolean

Write all AddOn products configurations

global GetKeyUID (string key) -> string

read the user's ID for given GPG key

Parameters:
key
global PrepareBuild () -> boolean

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

global BuildAddOn () -> boolean

Write all add-on-creator settings

Return value:
true on success
global Export () -> map

Export the settings about current Add-On product