[packagekit] Anjuta and PackageKit

Richard Hughes hughsient at gmail.com
Wed Oct 29 02:25:33 PDT 2008


On Wed, 2008-10-29 at 14:35 +0530, Debarshi Ray wrote:
> > The first gives you a nice fire and forget interface like
> >
> > /* execute sync method */
> > ret = dbus_g_proxy_call (proxy, "InstallPackageName", &error,
> >                         G_TYPE_UINT, xid, /* window xid, 0 for none */
> >                         G_TYPE_UINT, timestamp, /* action timestamp, 0 for unknown */
> >                         G_TYPE_STRING, "pygtk-devel",
> >                         G_TYPE_INVALID, G_TYPE_INVALID);
> 
> I like this approach. :-)

I thought you might :-)

> One thing which bothers me is the different names of packages on
> different distributions. eg., Fedora uses the -devel suffix while
> Debian has -dev. I guess, one way out would be to use
> InstallProvideFile to look for the packages providing the libraries
> and headers. Is there any other way to do it?

Well, InstallProvideFile might do the trick, but I don't think you need
to do that. It's slower, and the user will be confused why you anjunta
just wants a single file, rather than a whole package.

The one thing you need to remember is that the only person that knows
the package name is the distro. Package names change even in stable
distros (copyright violations) so the ONLY entity to be in a position to
set the name is the distro. In Ubuntu Yellow Yipp the package might be
called pygtk-dev but in Ubuntu Zero Zipper it might be called
pygtk8-dev. The same version of anjunta will be built for Y and Z, so
the distro will have to patch the name.

So, what I propose is that you do:

/* BIG FAT DISTRO NOTICE: patch this package name */
ret = dbus_g_proxy_call (proxy, "InstallPackageName", &error,
                         G_TYPE_UINT, xid, /* window xid, 0 for none */
                         G_TYPE_UINT, timestamp, /* action timestamp, 0 for unknown */
                         G_TYPE_STRING, "pygtk-development-files",
                         G_TYPE_INVALID, G_TYPE_INVALID);

And then fedora _trivially_ patches this to pygtk-devel, Y patches this
to pygtk-dev and Z patches this to pygtk8-dev. If the distro renames the
package, then it's in a position to also correct the patches it has on
other software at the same time.

I really think the common package name thing is a big myth -- just
choose one name upstream, stick with it, and let the distros do what
they are supposed to do: integrate your software with their product.

Richard.





More information about the PackageKit mailing list