InstallAvailable'da birkaç hata buldum, düzeltmek yerine exa'nın önerdiği yönteme geçtim. list-available çıktısı'nı istenilen komuta veren ve işleyen 2 ufak betik ile durumu çözmeye karar verdim...

This commit is contained in:
S.Çağlar Onur
2005-09-26 00:09:51 +00:00
parent 39510d3676
commit b946537ff2
3 changed files with 20 additions and 27 deletions
-27
View File
@@ -331,33 +331,6 @@ specified a package name, it should exist in a specified repository.
pisi.api.install(self.args)
self.finalize()
class InstallAvailable(Command):
"""Install available packages in the repositories
Usage: install-available [ <repo1> <repo2> ... 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
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
argNUM=${#}
if [ ${argNUM} -lt 1 ] ; then
echo "At least one repo name needed"
exit 1
fi
for x in "$@" ; do
./pisi-cli graph `./pisi-cli list-available $x | tail -n+3 | xargs`
dot -Tpng pgraph.dot -o ~/packageDEP4${x}.png
done
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
argNUM=${#}
if [ ${argNUM} -lt 1 ] ; then
echo "At least one repo name needed"
exit 1
fi
./pisi-cli --ignore-comar install `./pisi-cli list-available $@ | tail -n+3 | xargs`