* add a long option to list avail. like list inst.

* print order in install files...
This commit is contained in:
Eray Özkural
2005-10-11 19:52:16 +00:00
parent cfd811f5e9
commit 863f91cb9c
2 changed files with 14 additions and 6 deletions
+2 -3
View File
@@ -191,8 +191,7 @@ def install_pkg_files(package_URIs):
G_f.write_graphviz(sys.stdout)
order = G_f.topological_sort()
order.reverse()
#if ctx.config.get_option('debug'):
# print 'installation order', order
ctx.ui.info(_('Installation order: ') + order)
for x in order:
operations.install_single_file(dfn[x])
else:
@@ -367,7 +366,7 @@ version %s, release %s, build %s.')
Bp.add(str(dep.package))
G_f.add_dep(x, dep)
B = Bp
if ctx.options.get_option('debug'):
if ctx.config.get_option('debug'):
G_f.write_graphviz(sys.stdout)
order = G_f.topological_sort()
order.reverse()
+12 -3
View File
@@ -703,6 +703,10 @@ Gives a brief list of PiSi components published in the repository.
name = ("list-available", "la")
def options(self):
self.parser.add_option("-l", "--long", action="store_true",
default=False, help="show in long format")
def run(self):
self.init(True)
@@ -726,10 +730,15 @@ Gives a brief list of PiSi components published in the repository.
installed_list = ctx.installdb.list_installed()
list.sort()
for p in list:
if p in installed_list:
print colorize(p, "cyan")
package = pkg_db.get_package(p)
if self.options.long:
ctx.ui.info(str(package))
else:
print p
pstr = p
if p in installed_list:
pstr = colorize(p, "cyan")
ctx.ui.info('%15s - %s ' % (pstr, package.summary))
class ListUpgrades(Command):
"""List packages to be upgraded