![]() |
![]() |
![]() |
PackageKit Reference Manual | ![]() |
---|---|---|---|---|
org.freedesktop.PackageKit.Transactionorg.freedesktop.PackageKit.Transaction — Transaction interface |
SetLocale (in 's' code) AcceptEula (in 's' eula_id) Cancel () DownloadPackages (in 'as' package_ids) GetAllowCancel (out 'b' allow_cancel) GetCategories () GetDepends (in 's' filter, in 'as' package_ids, in 'b' recursive) GetDetails (in 'as' package_ids) GetFiles (in 'as' package_ids) GetOldTransactions (in 'u' number) GetPackageLast (out 's' package) GetPackages (in 's' filter) GetProgress (out 'u' percentage, out 'u' subpercentage, out 'u' elapsed, out 'u' remaining) GetRepoList (in 's' filter) GetRequires (in 's' filter, in 'as' package_ids, in 'b' recursive) GetRole (out 's' role, out 's' text) GetStatus (out 's' status) GetUpdateDetail (in 'as' package_ids) GetUpdates (in 's' filter) GetDistroUpgrades () InstallFiles (in 'b' trusted, in 'as' full_paths) InstallPackages (in 'as' package_ids) InstallSignature (in 's' sig_type, in 's' key_id, in 's' package_id) IsCallerActive (out 'b' is_active) RefreshCache (in 'b' force) RemovePackages (in 'as' package_ids, in 'b' allow_deps, in 'b' autoremove) RepoEnable (in 's' repo_id, in 'b' enabled) RepoSetData (in 's' repo_id, in 's' parameter, in 's' value) Resolve (in 's' filter, in 'as' package) Rollback (in 's' transaction_id) SearchDetails (in 's' filter, in 's' search) SearchFile (in 's' filter, in 's' search) SearchGroup (in 's' filter, in 's' search) SearchName (in 's' filter, in 's' search) UpdatePackages (in 'as' package_ids) UpdateSystem () WhatProvides (in 's' filter, in 's' type, in 's' search)
AllowCancel ('b' allow_cancel) CallerActiveChanged ('b' is_active) Category ('s' parent_id, 's' cat_id, 's' name, 's' summary, 's' icon) Details ('s' package_id, 's' license, 's' group, 's' detail, 's' url, 't' size) ErrorCode ('s' code, 's' details) Files ('s' package_id, 's' file_list) Finished ('s' exit, 'u' runtime) Message ('s' type, 's' details) Package ('s' info, 's' package_id, 's' summary) ProgressChanged ('u' percentage, 'u' subpercentage, 'u' elapsed, 'u' remaining) RepoDetail ('s' repo_id, 's' description, 'b' enabled) RepoSignatureRequired ('s' package_id, 's' repository_name, 's' key_url, 's' key_userid, 's' key_id, 's' key_fingerprint, 's' key_timestamp, 's' type) EulaRequired ('s' eula_id, 's' package_id, 's' vendor_name, 's' license_agreement) RequireRestart ('s' type, 's' details) StatusChanged ('s' status) Transaction ('s' old_tid, 's' timespec, 'b' succeeded, 's' role, 'u' duration, 's' data, 'u' uid, 's' cmdline) UpdateDetail ('s' package_id, 's' updates, 's' obsoletes, 's' vendor_url, 's' bugzilla_url, 's' cve_url, 's' restart, 's' update_text, 's' changelog, 's' state, 's' issued, 's' updated) DistroUpgrade ('s' type, 's' name, 's' summary) Destroy ()
org.freedesktop.PackageKit.Transaction implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties
This method allows the calling session to set a system locale for the package manager so that summaries and descriptions can be correctly localised.
|
The locale code, for example en_GB. |
This method allows the user to accept a end user licence agreement.
|
A valid EULA ID |
This method cancels a transaction that is already running
This method downloads packages into a temporary directory.
|
An array of package IDs. |
Get if cancel is allowed for the transaction
|
If cancel is allowed |
This method return the collection categories
This method returns packages that this package depends on.
This method typically emits Progress, Status and Error and Package.
Package enumerated types should be available or installed.
|
A correct filter, e.g. none or installed;~devel |
|
An array of package IDs. |
|
Either true or false. If yes then the requirements should be returned for all packages returned. This means if gnome-power-manager depends on NetworkManager and NetworkManager depends on HAL, then GetDepends on gnome-power-manager should return both HAL and NetworkManager. |
This method should return all the details about a specific package_id.
This method typically emits Progress, Status and Error and Details.
|
An array of package IDs. |
This method should return the file list of the package_id.
This method typically emits Progress, Status and Error and Files.
|
An array of package IDs. |
This method allows a client to view details for old transactions.
|
The number of past transactions, or 0 for all known transactions. |
This method emits the package that was last emmitted from the daemon. This allows any GUI that is monitoring transactions to accurately reflect the current state of the transaction at startup.
|
The last package_id. |
This method returns all the packages without a search term.
This method typically emits Progress, Error and Package.
Package enumerated types should be available or installed.
|
A correct filter, e.g. none or installed;~devel |
GetProgress (out 'u' percentage, out 'u' subpercentage, out 'u' elapsed, out 'u' remaining)
This method gets the progress completion of the daemon.
|
The percentage complete of the whole transaction. |
|
The percentage complete of the individual task, for example, downloading. |
|
The amount of time elapsed during the transaction. |
|
The estimated remaining time of the transaction, or 0 if not known. |
This method returns the list of repositories used in the system.
This method should emit RepoDetail.
|
A correct filter, e.g. none or installed;~devel |
This method returns packages that depend on this package. This is useful to know, as if package_id is being removed, we can warn the user what else would be removed.
This method typically emits Progress, Status and Error and Package.
Package enumerated types should be available or installed.
|
A correct filter, e.g. none or installed;~devel |
|
An array of package IDs. |
|
Either true or false. If yes then the requirements should be returned for all packages returned. This means if gnome-power-manager depends on NetworkManager and NetworkManager depends on HAL, then GetRequires on HAL should return both gnome-power-manager and NetworkManager. |
This method returns the current role of the transaction.
|
The PkRoleEnum in text form. |
|
The original search terms or package names that are used to start the transaction. Multiple entries are split using ;. |
This method returns the status of the transaction.
|
The PkStatusEnum in string form. |
This method returns details about a specific update.
This method typically emits UpdateDetail and Error
|
An array of package IDs. |
This method should return a list of packages that are installed and are upgradable. It should only return the newest update for each installed package.
This method typically emits Progress, Error and Package.
Package enumerated types should be blocked, low, normal, important or security.
The status blocked signifies the package cannot be updated, probably due to other dependencies not being met. This type allows the GUI tools to show to the user that an update exists, but cannot be installed. The reason for it not being installed should be put into the update description when doing GetUpdateDetail.
A filter such as basename or gui is also useful if you want to do filtering on the method to only show the main packages rather than the complete list. The complete list is available but specifying none as the filter. Using no filter which may be useful in advanced tools or when using libpackagekit and searching for an update of a specific name. Other filter types may be present, but can be safely ignored of the backend does not support them.
|
A correct filter, e.g. none or installed;~devel |
This method should return a list of distribution upgrades that are available. It should not return updates, only major upgrades.
This method typically emits DistroUpgrade, Error and
This method installs local package files onto the local system.
The installer should always install extra dependant packages automatically.
This method typically emits Progress, Status and Error and Package.
Package enumerated types should be downloading, updating, installing or removing.
|
If the package is trusted, i.e. if it has a pre-trusted security signature. |
|
An array of full path and filenames to packages. |
This method installs new packages on the local system.
The installer should always install extra packages automatically as the use could call GetDepends prior to the install if a confirmation is required in the UI.
This method typically emits Progress, Status and Error and Package.
Package enumerated types should be downloading, updating, installing or removing.
|
An array of package IDs. |
This method allows us to install new security keys.
|
A key type, e.g. gpg |
|
A key ID, e.g. BB7576AC |
|
A PackageID for the package that the user is trying to install |
This method allows us to find if the original caller of the method is still connected to the session bus. This is usually an indication that the client can handle it's own error handling and EULA callbacks rather than another program taking over.
|
If the client is still connected. |
This method should fetch updated meta-data for all enabled repositories. This operation should be only scheduled when the computer is idle as the network connection will be very active, and will the computer will have have non-trivial levels of hard disk and processor activity. For these reasons, it should not be done automatically when on battery power.
This method typically emits Progress, Error and Package.
|
If the caches should be cleaned and reloaded even if there is valid, up to date data. |
This method removes packages from the local system.
This method typically emits Progress, Status and Error and Package.
Package enumerated types should be downloading, updating, installing or removing.
|
An array of package IDs. |
|
Either true or false. If true allow other packages to be removed with the package, but false should cause the script to abort if other packages are dependant on the package. |
|
Either true or false. This option is only really interesting on embedded devices with a limited amount of flash storage. It suggests to the packagekit backend that dependencies installed at the same time as the package should also be removed if they are not required by anything else. For instance, if you install OpenOffice, it might download libneon as a dependency. When auto_remove is set to true, and you remove OpenOffice then libneon will also get removed automatically. |
This method enables the repository specified.
|
A repository identifier, e.g. fedora-development-debuginfo |
|
true if enabled, false if disabled. |
This method allows arbitary data to be passed to the repository handler.
|
A repository identifier, e.g. fedora-development-debuginfo |
|
The backend specific value, e.g. set-download-url. |
|
The backend specific value, e.g. http://foo.bar.org/baz. |
This method turns a single package name into a package_id suitable for the other methods.
This method typically emits Error and Package.
Package enumerated types should be available or installed.
|
A correct filter, e.g. none or installed;~devel |
|
An array of package names, e.g. scribus-clipart. |
This method rolls back the package database to a previous transaction.
|
A valid transaction ID. |
This method allows deeper searching than SearchName().
Do not refresh the package cache. This should be fast. This is very similar to search-name. This should search as much data as possible, including, if possible repo names, package summaries, descriptions and URLs.
This method typically emits Progress, Error and Package.
Package enumerated types should be available or installed.
|
A correct filter, e.g. none or installed;~devel |
|
A single word search term with no wildcard chars. |
This method searches for files on the local system and files in available packages.
This should search for files. This should allow an application to find out what package owns a file on the system.
This method typically emits Progress, Error and Package.
Package enumerated types should be available or installed.
|
A correct filter, e.g. none or installed;~devel |
|
A single local path on the system |
This method returns packages from a given group enumerated type.
Do not refresh the package cache. This should be fast.
This method typically emits Progress, Error and Package.
Package enumerated types should be available or installed.
|
A correct filter, e.g. none or installed;~devel |
|
An enumerated group_type, or unknown |
This method searches the package database by package name.
Do not refresh the package cache. This should be fast.
Try to emit installed before available packages first, as it allows the client program to perform the GUI filtering and matching whilst the daemon is running the transaction.
If the backend includes installed and available versions of the same package when searching then the available version will have to be filtered in the backend.
The search query in the backend should not be case sensitive, and should not be sensitive to _ or -.
The search methods should return all results in all repositories. This may mean that multiple versions of package are returned. If this is not what is wanted by the client program, then the newest filter should be used.
This method typically emits Progress, Error and Package.
Package enumerated types should be available or installed.
|
A correct filter, e.g. none or installed;~devel |
|
A single word search term with no wildcard chars |
This method updates existing packages on the local system.
The installer should always update extra packages automatically to fulfil dependencies.
This should allow an application to find out what package owns a file on the system.
This method typically emits Progress, Status and Error and Package.
|
An array of package IDs. |
This method updates all packages on the system to thier newest versions.
The installer should update all the updateable packages on the system, including automatically installing any new packages that are needed for dependancies.
This method returns packages that provide the supplied attributes. This method is useful for finding out what package(s) provide a modalias or GStreamer codec string.
This method typically emits Progress, Status and Error and Package.
Package enumerated types should be available or installed.
|
A correct filter, e.g. none or installed;~devel |
|
A PkProvideType, e.g. PK_PROVIDES_ENUM_CODEC. |
|
The data to send to the backend to get the packages. Note: This is backend specific. |
This signal is sent when the backend decides that the transaction can no longer be cancelled, or is now able to be cancelled.
|
If the backend is in a cancelable state. |
This signal is emitted when the session program that started the transaction exits.
|
If the caller is active, usually FALSE. |
This signal send information about a collection category
|
The parent identifier, e.g. applications. If the category is a root entry, use a blank parent. |
|
The category identifier, e.g. applications;system-tools. The identifier does not have to be related to the parent_id in any way. A menu tree is made from multiple Category signals. The tree does not have any depth or bredth limits, although it should be kept to less than about 100 entries as this will be shown to the user in a menu. The cat_id will be sent as a parameter to SearchGroup so you may have to prefix or otherwise identify the ID to not confuse the search method. |
|
The localised name of the category, e.g. System Tools. |
|
The localised category summary, e.g. Tools for mangaing system state. This is not normally shown in the menus, but may be shown in helper popups. |
|
The icon name for the category, e.g. server-cfg. If the icon is not known, then it should be set to image-missing. |
This signal allows the backend to convey more details about the package.
|
The package ID |
|
The license string, e.g. GPLv2+ or BSD and (MPLv1.1 or GPLv2+). More details about the correct way to format licensing strings can be found on the Fedora packaging wiki. |
|
The enumerated package group description |
|
The multi-line package description. NOTE: Tabs may have to be stripped from the description to avoid being split. |
|
The upstream project homepage |
|
The size of the package in bytes. This should be the size of the entire package file, not the size of the files installed on the system. |
This signal is used to report errors back to the session program.
Errors should only be send on fatal abort.
|
Enumerated type, e.g. no-network. |
|
Long description or error, e.g. failed to connect to mytry.xml |
This signal is used to push file lists from the backend to the session.
|
The Package ID that called the method. |
|
The file list, with each file seporated with ;. |
This signal is used to signal that the transaction has finished.
|
The PkExitEnum describing the exit status of the transaction. |
|
The amount of time in milliseconds that the transaction ran for. |
This signal is sent when the backend wants to send a message to the session.
This allows the backend to queue up a message to be shown after the transaction has completed.
|
One of warning, notice, or daemon. |
|
Required details about the message, non-localised. |
This signal allows the backend to communicate packages to the session.
If updating, as packages are updated then emit them to the screen. This allows a summary to be presented after the transaction.
When returning results from a search always return installed before available for the same package name.
|
A valid info string enumerated type |
|
A valid package ID string with as much data as known |
|
The one line package summary, e.g. Clipart for OpenOffice |
ProgressChanged ('u' percentage, 'u' subpercentage, 'u' elapsed, 'u' remaining)
This signal describes the completion of the transaction.
This is optional. Backends should send the percentage fields to 101 if the amount complete cannot be calculated.
|
The percentage complete of the whole transaction. |
|
The percentage complete of the individual task, for example, downloading. |
|
The amount of time in seconds this transaction has been in the running state |
|
The amount of time in seconds this transaction will take to complete. Zero is sent for unknown. |
This signal describes a repository on the system.
|
The repository ID. |
|
A description of the repository. |
|
If the repository is enabled and in use. |
RepoSignatureRequired ('s' package_id, 's' repository_name, 's' key_url, 's' key_userid, 's' key_id, 's' key_fingerprint, 's' key_timestamp, 's' type)
This signal is emitted when a transaction is not possible due to a missing security certificate.
Some backends support repositories which use a cryptographic signature, such as GPG. If a package cannot be installed because it is signed with a key that has not been verified, this signal is generated so the user can choose to accept or decline the key.
This signal includes information that can be used to verify that the key should be trusted, such as a URL for the company or person who owns the key, the key's ID, the userid of the key creator, and the date the key was generated.
|
A package ID for the package that is trying to be installed |
|
The name of the repository associated with the provided key. |
|
The URL provided with the key. |
|
The user id associated with the key. |
|
A unique identifier for the key. |
|
The hashed fingerprint of the key. |
|
The date the key was created. |
|
The type of signature used. gpg, for example. |
EulaRequired ('s' eula_id, 's' package_id, 's' vendor_name, 's' license_agreement)
This signal is emitted when a transaction is not possible due to a EULA that needs to be agreed to at install time.
Some backends support EULAs, which have to be agreed to before the install can proceed.
|
The eula_id which identifies the EULA - this is provided so that if a specific EULA has previously agreed to a EULA from Acme Corp it is not asked again. An example eula_id's is vmware5_single_user. |
|
A package ID for the package that is trying to be installed. |
|
The vendor that is providing the EULA. |
|
The full text EULA. |
This signal is sent when the session program should notify the user that a restart is required.
This is optional, but highly recommended.
This can be sent as many times as needed by the backend script. PackageKit will always choose the 'worst' method in the UI notification.
|
One of system, application or session. |
|
Optional details about the restart |
This signal is sent when the status of the transaction has changed.
This is optional, but highly recommended. It gives the GUI tools a chance to show a different icon to show what stage the transaction is in, for instance, a downloading icon can be shown whilst in the download state.
|
One of download, install, update or remove. |
Transaction ('s' old_tid, 's' timespec, 'b' succeeded, 's' role, 'u' duration, 's' data, 'u' uid, 's' cmdline)
This signal is sent when more details are required about a specific transaction.
|
The transaction ID of the old transaction. |
|
The timespec of the old transaction in ISO8601 format. |
|
If the transaction succeeded. |
|
The role enumerated type. |
|
The duration of the transaction in milliseconds. |
|
Any data associated with the transaction. |
|
The user ID of the user that scheduled the action. |
|
The command line of the tool that scheduled the action, e.g. /usr/bin/gpk-application. |
UpdateDetail ('s' package_id, 's' updates, 's' obsoletes, 's' vendor_url, 's' bugzilla_url, 's' cve_url, 's' restart, 's' update_text, 's' changelog, 's' state, 's' issued, 's' updated)
This signal is sent when more details are required about a specific update.
|
The package ID |
|
A list of package_id's that are to be updated, seporated by &. This odd delimited was chosen as \t is already being used in the spawned backends, and & is a banned character in a package_id. |
|
A list of package_id's that are to be obsoleted, separated by & |
|
A URL with more details on the update, e.g. a page with more information on the update. The format of this command should be http://www.foo.org/page.html?4567;Update to SELinux |
|
A bugzilla URL with more details on the update. If no URL is available then this field should be left empty. |
|
A CVE URL with more details on the security advisory. |
|
A valid restart type, e.g. system. |
|
The update text describing the update in a non-localised way. Newlines should be converted to ; before printed. |
|
The ChangeLog text describing the changes since the last version. |
|
The state of the update, e.g. stable or testing. |
|
The ISO8601 encoded date that the update was issued. |
|
The ISO8601 encoded date that the update was updated. |
This signal allows the backend to communicate distribution upgrades to the session.
|
A valid upgrade string enumerated type, e.g. stable or unstable |
|
The short name of the distribution, e.g. Fedora Core 10 RC1 |
|
The multi-line description of the release. |
This signal is sent when the transaction has been destroyed and is no longer available for use.