From 2058459ec844f6afe4d01edb611176f35ae8fda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Thu, 22 Sep 2005 14:26:33 +0000 Subject: [PATCH] =?UTF-8?q?install-available=20komutu,=20bir=20depodaki=20?= =?UTF-8?q?t=C3=BCm=20paketleri=20kurmaya=20yar=C4=B1yor...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/cli/commands.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 89f0e085..f559c954 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -332,6 +332,32 @@ specified a package name, it should exist in a specified repository. self.finalize() +class InstallAvailable(Command): + """Install available packages in the repositories + +Usage: install-available [ ... repon ] + +Install all packages in the given repository. +""" + __metaclass__ = autocommand + + def __init__(self): + super(InstallAvailable, self).__init__() + + name = ("install-available", "ia") + + def run(self): + from pisi import packagedb + + self.init() + + # iterate over repos + for repo in ctx.repodb.list(): + pkg_db = packagedb.get_db(repo) + # get all packages from repo and install them + pisi.api.install(pkg_db.list_packages()) + self.finalize() + class Upgrade(PackageOp): """Upgrade PISI packages