[packagekit] [PATCH] Bug #12883, PackageKit has a hard dependency on libnm_glib

Richard Hughes hughsient at gmail.com
Tue Oct 23 05:15:37 PDT 2007


On Tue, 2007-10-23 at 15:08 +0300, S.Çağlar Onur wrote:
> 23 Eki 2007 Sal tarihinde, Richard Hughes şunları yazmıştı: 
> > That's great, thanks. I'll probably do a release tonight, as NEWS is
> > getting a little long now...
> 
> Could you please review and ACK/NACK following?

Sure.

> +++ b/backends/pisi/helpers/get-repo-list.py
> @@ -0,0 +1,20 @@
> +#!/usr/bin/python
> +# -*- coding: utf-8 -*-
> +#
> +# Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
> +# Copyright (C) 2007 S.Çağlar Onur <caglar at pardus.org.tr>

You don't need to include me in any of the pisi files :-)

> +++ b/backends/pisi/helpers/pisiBackend.py
...
> +        if self.installdb.has_package(package):
> +            self.status(STATE_REMOVE)
> +            try:
> +                pisi.api.remove([package])
> +            except pisi.Error,e:
> +                self.error(ERROR_INTERNAL_ERROR, e)

Can we refine this error? What could go wrong?

> +        else:
> +            self.error(ERROR_INTERNAL_ERROR, "Package is not installed")

You want ERROR_PACKAGE_NOT_INSTALLED here.

> +        if self.packagedb.has_package(package):
> +            self.status(STATE_INSTALL)
> +            try:
> +                pisi.api.install([package])
> +            except pisi.Error,e:
> +                self.error(ERROR_INTERNAL_ERROR, e)
> +        else:
> +            self.error(ERROR_INTERNAL_ERROR, "Package is already installed")

Same.

> +    def update(self, package_id):
> +        # FIXME: fetch/install progress
> +        self.allow_interrupt(False);
> +        self.percentage(0)
> +
> +        package = self.get_package_from_id(package_id)[0]
> +
> +        if self.installdb.has_package(package):
> +            try:
> +                pisi.api.upgrade([package])
> +            except pisi.Error,e:
> +                self.error(ERROR_INTERNAL_ERROR, e)
> +        else:
> +            self.error(ERROR_INTERNAL_ERROR, "Package is already installed")

Same.

Other than that, it looks great, thanks.

Richard.





More information about the PackageKit mailing list