Ejemplo n.º 1
0
 def run_update(self, packages):
     packages = packages or [self.AJENTI_PACKAGE_NAME]
     actions = []
     for name in packages:
         mgr = PackageManager.get()
         p = PackageInfo()
         p.name, p.action = name, 'i'
         actions.append(p)
     mgr.do(actions)
Ejemplo n.º 2
0
 def run_update(self, packages):
     packages = packages or [self.AJENTI_PACKAGE_NAME]
     actions = []
     for name in packages:
         mgr = PackageManager.get()
         p = PackageInfo()
         p.name, p.action = name, 'i'
         actions.append(p)
     mgr.do(actions)
Ejemplo n.º 3
0
    def check_for_updates(self, callback):
        mgr = PackageManager.get()

        def worker():
            mgr.refresh()
            r = []
            for p in mgr.upgradeable:
                if p.name.startswith(self.AJENTI_PACKAGE_NAME):
                    r.append(p.name)
            callback(r)

        gevent.spawn(worker)
Ejemplo n.º 4
0
    def check_for_updates(self, callback):
        mgr = PackageManager.get()

        def worker():
            mgr.refresh()
            r = []
            for p in mgr.upgradeable:
                if p.name.startswith(self.AJENTI_PACKAGE_NAME):
                    r.append(p.name)
            callback(r)

        gevent.spawn(worker)