do not allow to reinstall a package if can be updated
This commit is contained in:
parent
18b0395f1f
commit
f8d30c03ac
@ -367,20 +367,18 @@ class PamacDBusService(dbus.service.Object):
|
||||
|
||||
def CheckUpdates(self):
|
||||
updates = 0
|
||||
_ignorepkgs = []
|
||||
_ignorepkgs = set()
|
||||
for group in self.handle.ignoregrps:
|
||||
db = self.handle.get_localdb()
|
||||
grp = db.read_grp(group)
|
||||
if grp:
|
||||
name, pkg_list = grp
|
||||
for pkg in pkg_list:
|
||||
if not pkg.name in _ignorepkgs:
|
||||
_ignorepkgs.append(pkg.name)
|
||||
_ignorepkgs.add(pkg.name)
|
||||
for name in self.handle.ignorepkgs:
|
||||
pkg = self.handle.get_localdb().get_pkg(name)
|
||||
if pkg:
|
||||
if not pkg.name in _ignorepkgs:
|
||||
_ignorepkgs.append(pkg.name)
|
||||
_ignorepkgs.add(pkg.name)
|
||||
if config.syncfirst:
|
||||
for name in config.syncfirst:
|
||||
pkg = self.handle.get_localdb().get_pkg(name)
|
||||
|
@ -492,6 +492,7 @@ def on_list_treeview_button_press_event(treeview, event):
|
||||
item.connect('activate', mark_to_remove, liststore[treeiter][0])
|
||||
right_click_menu.append(item)
|
||||
if transaction.get_syncpkg(liststore[treeiter][0].name):
|
||||
if not pyalpm.sync_newversion(liststore[treeiter][0], transaction.syncdbs):
|
||||
item = Gtk.ImageMenuItem(_('Reinstall'))
|
||||
item.set_image(Gtk.Image.new_from_pixbuf(to_reinstall_icon))
|
||||
item.set_always_show_image(True)
|
||||
|
Loading…
Reference in New Issue
Block a user