* list-upgrades'i calistir
* ufak duzeltmeler * pozitifine baslarim oyle organizasyonun * cardrock'mis. !@#$%^& * o televizyona cikan pis sari cuceyi de gorsem dovecegim
This commit is contained in:
@@ -307,6 +307,8 @@ def upgrade_pkg_names(A):
|
|||||||
return True # everything went OK :)
|
return True # everything went OK :)
|
||||||
|
|
||||||
def list_upgradable():
|
def list_upgradable():
|
||||||
|
ignore_build = ctx.config.options and ctx.config.options.ignore_build_no
|
||||||
|
|
||||||
A = ctx.installdb.list_installed()
|
A = ctx.installdb.list_installed()
|
||||||
# filter packages that are not upgradable
|
# filter packages that are not upgradable
|
||||||
Ap = []
|
Ap = []
|
||||||
|
|||||||
+25
-22
@@ -197,7 +197,7 @@ If run without parameters, it prints the general help."""
|
|||||||
def buildno_opts(self):
|
def buildno_opts(self):
|
||||||
self.parser.add_option("", "--ignore-build-no", action="store_true",
|
self.parser.add_option("", "--ignore-build-no", action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Don't take build no into account.")
|
help="do not take build no into account.")
|
||||||
|
|
||||||
|
|
||||||
class Build(Command):
|
class Build(Command):
|
||||||
@@ -239,10 +239,10 @@ class PackageOp(Command):
|
|||||||
|
|
||||||
def options(self):
|
def options(self):
|
||||||
self.parser.add_option("", "--ignore-comar", action="store_true",
|
self.parser.add_option("", "--ignore-comar", action="store_true",
|
||||||
default=False, help="xxxx")
|
default=False, help="bypass comar configuration agent")
|
||||||
## self.parser.add_option("", "--ignore-dependency",
|
## self.parser.add_option("", "--ignore-dependency",
|
||||||
## action="store_true",
|
## action="store_true",
|
||||||
## default=False, help="xxxx")
|
## default=False, help="death")
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
super(PackageOp, self).init(True)
|
super(PackageOp, self).init(True)
|
||||||
@@ -674,28 +674,31 @@ Usage: list-upgrades [ <repo1> <repo2> ... repon ]
|
|||||||
|
|
||||||
name = ("list-upgrades", "lu")
|
name = ("list-upgrades", "lu")
|
||||||
|
|
||||||
|
def options(self):
|
||||||
|
self.parser.add_option("-l", "--long", action="store_true",
|
||||||
|
default=False, help="show in long format")
|
||||||
|
self.parser.add_option("-i", "--install-info", action="store_true",
|
||||||
|
default=False, help="show detailed install info")
|
||||||
|
buildno_opts(self)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
self.init(True)
|
self.init(True)
|
||||||
|
list = pisi.api.list_upgradable()
|
||||||
if self.args:
|
|
||||||
for arg in self.args:
|
|
||||||
self.print_packages(arg)
|
|
||||||
else:
|
|
||||||
# print for all repos
|
|
||||||
for repo in ctx.repodb.list():
|
|
||||||
ctx.ui.info("Repository : %s\n" % repo)
|
|
||||||
self.print_packages(repo)
|
|
||||||
self.finalize()
|
|
||||||
|
|
||||||
def print_packages(self, repo):
|
|
||||||
from pisi import packagedb
|
|
||||||
|
|
||||||
pkg_db = packagedb.get_db(repo)
|
|
||||||
list = pkg_db.list_upgrades()
|
|
||||||
list.sort()
|
list.sort()
|
||||||
for p in list:
|
if self.options.install_info:
|
||||||
print p
|
print 'Package Name |St| Version| Rel.| Build| Distro| Date'
|
||||||
|
print '========================================================================'
|
||||||
|
for pkg in list:
|
||||||
|
package = pisi.packagedb.inst_packagedb.get_package(pkg)
|
||||||
|
inst_info = ctx.installdb.get_info(pkg)
|
||||||
|
if self.options.long:
|
||||||
|
print package
|
||||||
|
print inst_info
|
||||||
|
elif self.options.install_info:
|
||||||
|
print '%-15s | %s ' % (package.name, inst_info.one_liner())
|
||||||
|
else:
|
||||||
|
print '%15s - %s ' % (package.name, package.summary)
|
||||||
|
self.finalize()
|
||||||
|
|
||||||
|
|
||||||
class ListPending(Command):
|
class ListPending(Command):
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ pwd
|
|||||||
PATH=$PATH:.
|
PATH=$PATH:.
|
||||||
set -x -e
|
set -x -e
|
||||||
|
|
||||||
#pisi-cli --ignore-build-no build tests/zip/pspec.xml tests/unzip/pspec.xml
|
pisi-cli --ignore-build-no build tests/zip/pspec.xml tests/unzip/pspec.xml
|
||||||
pisi-cli --yes-all --ignore-comar install unzip-5.50-1.pisi zip-2.3-1.pisi
|
pisi-cli --yes-all --ignore-comar install unzip-5.50-1.pisi zip-2.3-1.pisi
|
||||||
|
|
||||||
mkdir -p myrepo
|
mkdir -p myrepo
|
||||||
cd myrepo
|
cd myrepo
|
||||||
#../pisi-cli --ignore-build-no build ../tests/zip2/pspec.xml ../tests/unzip2/pspec.xml
|
../pisi-cli --ignore-build-no build ../tests/zip2/pspec.xml ../tests/unzip2/pspec.xml
|
||||||
cd ..
|
cd ..
|
||||||
pisi-cli --absolute-uris index myrepo
|
pisi-cli --absolute-uris index myrepo
|
||||||
pisi-cli remove-repo repo1
|
pisi-cli remove-repo repo1
|
||||||
@@ -18,5 +18,6 @@ pisi-cli list-repo
|
|||||||
pisi-cli update-repo repo1
|
pisi-cli update-repo repo1
|
||||||
pisi-cli list-available
|
pisi-cli list-available
|
||||||
pisi-cli --install-info list-installed
|
pisi-cli --install-info list-installed
|
||||||
|
pisi-cli list-upgrades
|
||||||
pisi-cli --ignore-comar upgrade zip
|
pisi-cli --ignore-comar upgrade zip
|
||||||
pisi-cli --install-info list-installed
|
pisi-cli --install-info list-installed
|
||||||
|
|||||||
Reference in New Issue
Block a user