diff --git a/pisi/api.py b/pisi/api.py index ead33d8c..bb92e686 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -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() diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index d4736d2e..6e61f7c1 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -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