示例#1
0
 def updateRepositories(self, check_repos=None):
     if not repos_available(self, check_repos):
         return False
     logger.debug("Updating repositories...")
     self.link.System.Manager["pisi"].updateAllRepositories(
         async=self.handler, timeout=2**16 - 1)
     return True
示例#2
0
    def operationAction(self,
                        packages,
                        silence=False,
                        reinstall=False,
                        connection_required=True):

        if connection_required:
            if not network_available() and not self.state == self.REMOVE:
                if not repos_available(self.iface):
                    self.showFailMessage()
                    return False

        if not silence and not self.state == self.REMOVE:
            if not self.conflictCheckPasses(packages):
                return False

        if reinstall:
            return self.iface.reinstallPackages(packages)

        return {
            self.ALL: self.iface.modifyPackages,
            self.INSTALL: self.iface.installPackages,
            self.REMOVE: self.iface.removePackages,
            self.UPGRADE: self.iface.upgradePackages
        }[self.state](packages)
示例#3
0
    def operationAction(self, packages, silence = False, reinstall = False, connection_required = True):

        if connection_required:
            if not network_available() and not self.state == self.REMOVE:
                if not repos_available(self.iface):
                    self.showFailMessage()
                    return False

        if not silence and not self.state == self.REMOVE:
            if not self.conflictCheckPasses(packages):
                return False

        if reinstall:
            return self.iface.reinstallPackages(packages)

        return {self.ALL    :self.iface.modifyPackages,
                self.INSTALL:self.iface.installPackages,
                self.REMOVE :self.iface.removePackages,
                self.UPGRADE:self.iface.upgradePackages}[self.state](packages)
示例#4
0
 def updateRepositories(self, check_repos = None):
     if not repos_available(self, check_repos):
         return False
     logger.debug("Updating repositories...")
     self.link.System.Manager["pisi"].updateAllRepositories(async=self.handler, timeout=2**16-1)
     return True