[packagekit] API proposal: Extended method to fetch dependency information
matthias at tenstral.net
Fri Jun 28 16:12:09 PDT 2013
I want to propose a change of the PackageKit APIs to improve
dependency-information handling. This was a request by people working
on the AppStream and Software-Center stuff (= creating
software-centers on top of PK) and has been discussed with Daniel on
Comments are welcome!
== Use case ==
Many package managers support the concept of "Suggests", where on
package can suggest another one in order to improve the first
package's functionality, add new visual styles to an application etc.
Suggested stuff is nice-to-have but not necessary for the basic
functionality of a package. In software-centers, this is displayed as
"Addons" for a given application, providing the users with the ability
to install related software which might be useful for what they want
So, having a way in PK to fetch this information would be a nice thing.
Also, advanced users might want to fetch detailed dependency
information on the cli.
== API design ==
I'd like to propose a new method on the DBus interface,
GetDependencies(pid, deptype) (or any other name which fits the case
best), which takes a package-id and an enum value, describing which
kind of dependencies for the given pid should be returned.
The following dependency types make sense (names can be changed to
whatever is best):
DEPENDENCY_TYPE_DEPENDS - The hard dependencies of a package
DEPENDENCY_TYPE_SUGGESTS - Packages which this package suggests to be installed
DEPENDENCY_TYPE_REVERSE_DEPENDS - The reverse dependencies on this
package (= other packages depending on this package)
For Debian distros, a _RECOMMENDS type (stronger dependency than
Suggests, but not as strong as Depends) would also be nice, but not
The GetDependencies() call would return a list of package-ids which
match the given filter.
Adding this function would deprecate the current GetDepends() and
GetRequires() calls and unify them in one new call.
And that would be it. Richard, what do you think? ;-)
Debian Developer | Freedesktop-Developer
I welcome VSRE emails. See http://vsre.info/
More information about the PackageKit