fix check updates freeze when an aur pkg was removed

This commit is contained in:
guinux 2014-01-11 12:18:43 +01:00
parent 2e05a2e9a6
commit 3873dbdc69
2 changed files with 5 additions and 4 deletions

View File

@ -467,9 +467,10 @@ class PamacDBusService(dbus.service.Object):
self.aur_updates_pkgs = aur.multiinfo(self.local_packages) self.aur_updates_pkgs = aur.multiinfo(self.local_packages)
self.aur_updates_checked = True self.aur_updates_checked = True
for aur_pkg in self.aur_updates_pkgs: for aur_pkg in self.aur_updates_pkgs:
comp = pyalpm.vercmp(aur_pkg.version, self.localdb.get_pkg(aur_pkg.name).version) if self.localdb.get_pkg(aur_pkg.name):
if comp == 1: comp = pyalpm.vercmp(aur_pkg.version, self.localdb.get_pkg(aur_pkg.name).version)
updates.append((aur_pkg.name, aur_pkg.version, aur_pkg.db.name, aur_pkg.tarpath, aur_pkg.download_size)) if comp == 1:
updates.append((aur_pkg.name, aur_pkg.version, aur_pkg.db.name, aur_pkg.tarpath, aur_pkg.download_size))
self.EmitAvailableUpdates((syncfirst, updates)) self.EmitAvailableUpdates((syncfirst, updates))
@dbus.service.method('org.manjaro.pamac', 'b', '') @dbus.service.method('org.manjaro.pamac', 'b', '')

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
version = '0.9.5' version = '0.9.6'
from gi.repository import Gtk, Gdk from gi.repository import Gtk, Gdk
from gi.repository.GdkPixbuf import Pixbuf from gi.repository.GdkPixbuf import Pixbuf