[packagekit] PackageKit and source packages?

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Sat May 21 09:18:41 PDT 2011


On 05/21/2011 10:44 AM, Richard Hughes wrote:
> On 21 May 2011 03:38, Benjamin M. Schwartz <bmschwar at fas.harvard.edu> wrote:
>> is there any way to say "PackageKit, please tell
>> me the source package associated with [this binary package]."?
> 
> No, but it's been asked for before. The issue is really how we define
> what a "source package" is. For some distros it's an upstream tarball
> location and a recipe, and some distros it's just a package NEVRA in a
> remote source.

You're right, I hadn't thought this quite all the way through.

> From my point of view, it would be handy to say:
> 
> GetSource($package_ids)
> 
> and then get back:
> 
> Package(info, package_id, summary)
> Package(info, package_id, summary)
> 
> From the package_id we can get the name, version, arch and repo. Would
> a single package_id be enough to encode all the source details for
> backends like apt, conary and gentoo? Ideas welcome.

I see basically two paths here:

1. Get the source code by asking PackageKit to install the source package,
and then asking PackageKit for the list of files owned by this package.
For RPM this applies literally.  For Gentoo, the backend would have to
emulate this somehow.

2. Get the source tarball from PackageKit (local path? remote URL?).  On
Gentoo (portage) this is approximately trivial, as the SRC_URI is
specified in each ebuild.  On Fedora (RPM) this might require the backend
to install the SRPM, extract the tarball, and then return the path.

Option 1 advantages:
Closer to PackageKit's current API.
More likely to (eventually) allow testing of changes by installing via the
distro's scripts (e.g. spec file, ebuild)

Option 2 advantages:
Probably simpler to implement overall
More likely to (eventually) allow integration with upstream's version
control (e.g. "git://..."), leading to patch submission.
Can run unprivileged, without modifying the filesystem outside $HOME.

I wish I could have all these advantages at the same time.  If forced to
choose, I think I favor Option 2.

--Ben

-------------- 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/20110521/979a5693/attachment-0004.pgp>


More information about the PackageKit mailing list