Methods
Methods used by the backends are as follows:
Search Name
The arguments are:
Option
Description
filter
A correct filter, e.g. none or
installed;~devel
search_term
A single word search term with no wildcard chars.
Do not refresh the package cache. This should be fast.
Always 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.
The search query in the backend should not be case sensitive, and
should not be sensitive to _ or -.
This method typically emits
Progress,
Error and
Package.
Package enumerated types should be
available or installed.
Search Group
The arguments are:
Option
Description
filter
A correct filter, e.g. none or
installed;~devel
group_type
An enumerated group_type, or unknown
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.
Search Details
The arguments are:
Option
Description
filter
A correct filter, e.g. none or
installed;~devel
search_term
A single word search term with no wildcard chars.
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.
Search File
The arguments are:
Option
Description
filter
A correct filter, e.g. none or
installed;~devel
search_term
A single word search term with no wildcard chars.
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.
Install Package
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.
The arguments are:
Option
Description
package_id
A single, valid, package ID.
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,
Status and
Error and
Package.
Package enumerated types should be
downloading,
updating,
installing or
removing.
Install File
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.
The arguments are:
Option
Description
full_path
A full path and filename to a single package.
This method typically emits
Progress,
Status and
Error and
Package.
Package enumerated types should be
downloading,
updating,
installing or
removing.
Remove Package
The arguments are:
Option
Description
allow_deps
Either "yes" or "no". If yes allow other packages to be
removed with the package, but "no" should cause the script
to abort if other packages are dependant on the package.
package_id
A single, valid, package ID.
This method typically emits
Progress,
Status and
Error and
Package.
Package enumerated types should be
downloading,
updating,
installing or
removing.
Get Depends
GetDepends should return packages that this package depends on.
The arguments are:
Option
Description
filter
A correct filter, e.g. none or
installed;
package_id
A single, valid, package ID.
recursive
Either "yes" or "no". 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 typically emits
Progress,
Status and
Error and
Package.
Package enumerated types should be
available or installed.
Resolve
Resolve turns a single package name into a package_id suitable for the
other methods.
The arguments are:
Option
Description
filter
A correct filter, e.g. none or
installed;~devel
package
A single package name, e.g. art-clipart.
This method typically emits
Error and
Package.
Package enumerated types should be
available or installed.
Get Update Detail
GetUpdateDetail should return details about the update.
The arguments are:
Option
Description
package_id
A single, valid, package ID.
This method typically emits
UpdateDetail and
Error
Get Requires
GetRequires should return 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.
The arguments are:
Option
Description
filter
A correct filter, e.g. none or
installed;
package_id
A single, valid, package ID.
recursive
Either "yes" or "no". 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 typically emits
Progress,
Status and
Error and
Package.
Package enumerated types should be
available or installed.
Get Description
GetDescription should return the description of that
package_id.
The arguments are:
Option
Description
package_id
A single, valid, package ID.
This method typically emits
Progress,
Status and
Error and
Description.
Get Files
GetFiles should return the file list of that
package_id.
The arguments are:
Option
Description
package_id
A single, valid, package ID.
This method typically emits
Progress,
Status and
Error and
Files.
Update Package
The installer should always update extra packages automatically.
The arguments are:
Option
Description
package_id
A single, valid, package ID.
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,
Status and
Error and
Package.
Update System
The installer should update all the updateable packages on the system,
including automatically installing any new packages that are needed for
dependancies.
There are no arguments.
This method typically emits
Progress,
Error and
RequireRestart and
Package.
Package enumerated types should be
downloading,
updating,
installing or
removing.
Get Updates
This function should return a list of packages that are installed and
are upgradable.
The arguments are:
Option
Description
filter
A correct filter, e.g. none or
basename
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.
Refresh Cache
There are no arguments.
This 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.
Get Repo List
Return the list of repositories used in the system.
There are no arguments.
This method typically emits
RepoDetail.
Repo Enable
This enables the repository specified.
The arguments are:
Option
Description
repo_id
A repository identifier, e.g.
fedora-development-debuginfo
enabled
true if enabled,
false if disabled.
Repo Set Data
This sets a parameter for the repository specified.
The arguments are:
Option
Description
repo_id
A repository identifier, e.g.
fedora-development-debuginfo
parameter
The backend specific value, e.g.
set-download-url.
value
The backend specific value, e.g.
http://foo.bar.org/baz.