[packagekit] PackageKit and source packages?

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Tue May 24 06:57:13 PDT 2011


On 05/24/2011 07:02 AM, Richard Hughes wrote:
> I'm just adding code to PackageKit to add source, and came upon a
> quandry: Should GetSource() take a "filter" argument? Might the user
> ever want to filter the results of GetSource by installed, newest or
> free-software?
> 
> At the moment I'm thinking the method should be GetSource(filter,
> [package_ids]) -- better ideas welcome.

Thanks for working on this.  I imagine GetSource should be just as you
described, if only for symmetry with GetDepends, GetRequires, and SearchFiles.

I do wonder, though: is this API is too specific?  This is a little crazy,
but what about a "GetRelated(filter, relation_enum, [package_ids])"?  The
functionality of GetSource would be provided by PK_RELATED_ENUM_SOURCE.

I can think of a few other relations that could eventually be exposed
here, like DEVEL (for header packages), DEBUG, DOCS, RECOMMENDS, SUGGESTS,
CONFLICTS (for packages that cannot be installed simultaneously)...

I admit that I can't think of a really good use case for the functionality
beyond GetSource ... but maybe you can.  There are also questions of API
aesthetics and extensibility, on which I can't really comment.

--Ben

P.S. Someone should ask the APT backend maintainer(s) what they think of
GetSource (in any incarnation), because Debian seems to be undergoing a
shift in how source packages are structured.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20110524/9143c4a3/attachment-0004.pgp>


More information about the PackageKit mailing list