The yumdaemon is an easy way to utililize the power of the yum package manager from your own programs
Name | Content |
---|---|
Package Id (pkg_id) | “name,epoch,ver,rel,arch,repo_id” |
Transaction List (tx_list) | “pkg_id,ts_state” |
Attribute | Description |
---|---|
name | Package Name |
epoch | Package Epoch |
ver | Package Version |
rel | Package Release |
arch | Package Architecture |
repo_id | Repository Id |
ts_state | Transaction Member state |
Transaction result:
<transaction_result> ::= <result>, <result>, ...., <result>
<result> ::= <action>, <pkg_list>
<action> ::= install | update | remove | install-deps | update-deps | remove-deps | skipped
<plg_list> ::= <pkg_info>, <pkg_info>, ......, <pkg_info>
<pkg_info> ::= <pkg_id>, size, <obs_list>
<pkg_id> ::= name, epoch, version, release, arch, repo_id
<obs_list> ::= <obs_id>, <obs_id>, ...., <obs_id>
<obs_id> ::= name, epoch, version, release, arch, repo_id for packages obsoletes by <pkg_id>
Attribute | Value |
---|---|
object | org.baseurl.YumSystem |
interface | org.baseurl.YumSystem |
path | / |
Get the API version
Returns: | string with API version |
---|
Get the daemon Lock, if posible
Get the daemon Lock, if posible
Get the value a list of repo ids
Parameters: | filter (string) – filter to limit the listed repositories |
---|---|
Returns: | list of repo id’s |
Return type: | array for stings (as) |
Get information about a give repo_id
Parameters: | repo_id (string) – repo id |
---|---|
Returns: | a dictionary with repo information (JSON) |
Return type: | string (s) |
Enabled a list of repositories, disabled all other repos
Parameters: | repo_ids – list of repo ids to enable |
---|
Get the value of a yum config setting
Parameters: | setting (string) – name of setting (debuglevel etc..) |
---|---|
Returns: | the config value of the requested setting (JSON) |
Return type: | string (s) |
Get the value of a yum config setting
Parameters: |
|
---|---|
Returns: | did the update succed |
Return type: | boolean (b) |
These methods is for getting packages and information about packages
get a list of packages matching the filter type
Parameters: | pkg_filter (string) – package filter (‘installed’,’available’,’updates’,’obsoletes’,’recent’,’extras’) |
---|---|
Returns: | list of pkg_id’s |
Return type: | array of strings (as) |
Parameters: |
|
---|---|
Returns: | list of (id, field1, field2...) (JSON), each JSON Sting contains (id, field1, field2...) |
Return type: | array of strings (as) |
Get a list of pkg ids for starts with name
Parameters: |
|
---|---|
Returns: | list of pkg_id’s |
Return type: | array of strings (as) |
get yum package attribute (description, filelist, changelog etc)
Parameters: |
|
---|---|
Returns: | the value of the attribute (JSON), the content depend on attribute being read |
Return type: | string (s) |
Get Updateinfo for a package
Parameters: | pkg_id (string) – pkg_id to get update info from |
---|---|
Returns: | update info for the package (JSON) |
Return type: | string (s) |
Search for packages where keys is matched in fields
Parameters: |
|
---|---|
Returns: | list of pkg_id’s for matches |
Return type: | array of stings (as) |
The high level methods simulate the yum command line main functions.
Works just like the yum install <cmds> command line
param cmds: package arguments separated by spaces type cmds: string return: return code, result of resolved transaction (rc = 2 is ok, else failure) (JSON) rtype: string (s)
Works just like the yum install <cmds> command line
Parameters: | cmds (string) – package arguments separated by spaces |
---|---|
Returns: | return code, result of resolved transaction (rc = 2 is ok, else failure) (JSON) |
Return type: | string (s) |
Works just like the yum install <cmds> command line
Parameters: | cmds (string) – package arguments separated by spaces |
---|---|
Returns: | return code, result of resolved transaction (rc = 2 is ok, else failure) (JSON) |
Return type: | string (s) |
Works just like the yum install <cmds> command line
Parameters: | cmds (string) – package arguments separated by spaces |
---|---|
Returns: | return code, result of resolved transaction (rc = 2 is ok, else failure) (JSON) |
Return type: | string (s) |
Works just like the yum install <cmds> command line
Parameters: | cmds (string) – package arguments separated by spaces |
---|---|
Returns: | return code, result of resolved transaction (rc = 2 is ok, else failure) (JSON) |
Return type: | string (s) |
These methods is for handling the current yum transaction
Add an package to the current transaction
Parameters: |
|
---|---|
Returns: | list of (pkg_id, transaction state) pairs for the added members (comma separated) |
Return type: | array of strings (as) |
Clear the current transaction
Get the currrent transaction
Returns: | list of (pkg_id, transaction state) pairs in the current transaction (comma separated) |
---|---|
Return type: | array of strings (as) |
Depsolve the current transaction
Returns: | (return code, result of resolved transaction) pair (rc = 2 is ok, else failure) (JSON) |
---|---|
Return type: | string (s) |
Execute the current transaction
Returns: | state of run transaction (0 = ok, 1 = need GPG import confirmation, 2 = error) |
---|---|
Return type: | int (i) |
Confirm import of at GPG Key by yum
Parameters: |
|
---|
Methods to work with yum groups and categories
Get available Categories & Groups
Get packages in a group by grp_id and grp_flt
Parameters: |
|
---|---|
Returns: | list of pkg_id’s |
Return type: | array of strings (as) |
Note
Under Development
More to come in the future, methods to install groups etc. has to be defined and implemented
Methods to work with the yum history
Get History transaction in a interval of days from today
Parameters: |
|
---|---|
Returns: | a list of (transaction ids, date-time) pairs (JSON) :rtype: string (s) |
Get packages from a given yum history transaction id
Parameters: | tid (integer) – history transaction id |
---|---|
Returns: | list of (pkg_id, state, installed) pairs |
Return type: | json encoded string |
Search the history for transaction matching a pattern
Parameters: | pattern (string) – patterne to match |
---|---|
Returns: | list of (tid,isodates) |
Signal with download progress information
Parameters: |
|
---|
:param ftime : formated string containing remaining or elapsed time
Signal with Transaction event information, telling the current step in the processing of the current transaction.
Steps are : start-run, download, pkg-to-download, signature-check, run-test-transaction, run-transaction, fail, end-run
Parameters: | event – current step |
---|
signal with RPM Progress
Parameters: |
|
---|
signal with GPG Key information of a key there need to be confirmed to complete the current transaction. after signal is send transaction will abort with rc=1 Use ConfirmGPGImport method to comfirm the key and run RunTransaction again
Parameters: |
|
---|
‘’‘
Attribute | Value |
---|---|
object | org.baseurl.YumSession |
interface | org.baseurl.YumSession |
path | / |
Get the API version
Returns: | string with API version |
---|
Get the daemon Lock, if posible
Get the daemon Lock, if posible
Get the value a list of repo ids
Parameters: | filter (string) – filter to limit the listed repositories |
---|---|
Returns: | list of repo id’s |
Return type: | array for stings (as) |
Get information about a give repo_id
Parameters: | repo_id (string) – repo id |
---|---|
Returns: | a dictionary with repo information (JSON) |
Return type: | string (s) |
Enabled a list of repositories, disabled all other repos
Parameters: | repo_ids – list of repo ids to enable |
---|
Get the value of a yum config setting
Parameters: | setting (string) – name of setting (debuglevel etc..) |
---|---|
Returns: | the config value of the requested setting (JSON) |
Return type: | string (s) |
These methods is for getting packages and information about packages
get a list of packages matching the filter type
Parameters: | pkg_filter (string) – package filter (‘installed’,’available’,’updates’,’obsoletes’,’recent’,’extras’) |
---|---|
Returns: | list of pkg_id’s |
Return type: | array of strings (as) |
Parameters: |
|
---|---|
Returns: | list of (id, field1, field2...) (JSON), each JSON Sting contains (id, field1, field2...) |
Return type: | array of strings (as) |
Get a list of pkg ids for starts with name
Parameters: |
|
---|---|
Returns: | list of pkg_id’s |
Return type: | array of strings (as) |
get yum package attribute (description, filelist, changelog etc)
Parameters: |
|
---|---|
Returns: | the value of the attribute (JSON), the content depend on attribute being read |
Return type: | string (s) |
Get Updateinfo for a package
Parameters: | pkg_id (string) – pkg_id to get update info from |
---|---|
Returns: | update info for the package (JSON) |
Return type: | string (s) |
Search for packages where keys is matched in fields
Parameters: |
|
---|---|
Returns: | list of pkg_id’s for matches |
Return type: | array of stings (as) |
Methods to work with yum groups and categories
Get available Categories & Groups
Get packages in a group by grp_id and grp_flt
Parameters: |
|
---|---|
Returns: | list of pkg_id’s |
Return type: | array of strings (as) |
Note
Under Development
More to come in the future, methods to install groups etc. has to be defined and implemented
Signal with download progress information
Parameters: |
|
---|
:param ftime : formated string containing remaining or elapsed time