[packagekit] PackageKit and source packages?

Anders F Björklund afb at algonet.se
Tue May 24 13:56:12 PDT 2011


Richard Hughes wrote:

> On 23 May 2011 15:31, Benjamin M. Schwartz <bmschwar at fas.harvard.edu> wrote:
>>> If we added the GetSource() call illustrated above, would that solve
>>> your use case?
>> 
>> I think it would.
> 
> 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?

No ?

You filter the (oddly named) GetDepends and GetRequires because
they return lists of packages, but not GetDetails nor GetFiles.

As for "GetRelated" and friends: YAGNI. "GetSource" is plenty.

> At the moment I'm thinking the method should be GetSource(filter,
> [package_ids]) -- better ideas welcome.

""" GetSource (in  'as' package_ids)

    This method should return the source package of the package_id.

    This method typically emits Progress, Status and Error and Package.

    package_ids: An array of package IDs."""

Possibly there should be a flag to tell whether to "install"/expand
the source package after download, but it doesn't have a good place ?
So might as well leave it compressed and unbuilt, for the user to do.
(e.g. probably by calling mock or pbuilder with it, for yum and apt.)

--anders




More information about the PackageKit mailing list