[packagekit] Auto Installed Packages

Richard Hughes hughsient at gmail.com
Wed Jan 30 09:18:31 PST 2008


On Wed, 2008-01-30 at 16:54 +0000, Thomas Wood wrote:
> I've just implemented a feature in opkg to keep track of packages that
> are automatically installed to satisfy a dependency. The idea being that
> if the users requests, these can be removed if they are no longer
> required.

Cool, I think apt can do that too. YUM might be able to do that with a
plugin, I can't remember.

> I think there are two possible scenarios about when the user may want to
> take advantage of this feature. Either during the remove function, or as
> part of a separate "clean up" function.
> 
> Does anyone have any thoughts on how this could be implemented in
> PackageKit?

Sure, as always :-)

We have at the moment:

    <method name="RemovePackage">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="s" name="tid" direction="in"/>
      <arg type="s" name="package_id" direction="in"/>
      <arg type="b" name="allow_deps" direction="in"/>
    </method>

Which basically means we can signal the package to remove, plus a
boolean flag to indicate if other dependent packages can also be
removed, so for instance, if removing openoffice-core also removes
openoffice-writer.

I think what we need to do is extend this method with another parameter
"cleanup_deps" which would mean clean up any package that was installed
with this one to satisfy a dep. We don't need another method as existing
backends can ignore the request to no ill effect.

Does that sound sensible?

Richard.





More information about the PackageKit mailing list