From 9cdcd7b48e7b958508f25ea69c36f8fb12d0f5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= Date: Tue, 7 Jun 2011 06:09:44 +0000 Subject: [PATCH] index: Print package names on the same line during source indexing --- pisi/index.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pisi/index.py b/pisi/index.py index afdadeb5..e74feb4b 100644 --- a/pisi/index.py +++ b/pisi/index.py @@ -172,7 +172,7 @@ def add_package(params): try: path, deltas, repo_uri = params - ctx.ui.info("\r%-80.80s" % (_('Adding package to index: %s') % + ctx.ui.info("\r%-80.80s" % (_('Adding package to index: %s') % os.path.basename(path)), noln = True) package = pisi.package.Package(path, 'r') @@ -260,19 +260,17 @@ def add_distro(path): def add_spec(params): try: - path , repo_uri = params - ctx.ui.info(_('Adding %s to source index') % path) + path, repo_uri = params + ctx.ui.info("\r%-80.80s" % (_('Adding %s to source index') % + path), noln = True) #TODO: may use try/except to handle this builder = pisi.operations.build.Builder(path) - #ctx.ui.error(_('SpecFile in %s is corrupt, skipping...') % path) - #ctx.ui.error(str(Error(*errs))) builder.fetch_component() sf = builder.spec if ctx.config.options and ctx.config.options.absolute_urls: sf.source.sourceURI = os.path.realpath(path) - else: # create relative path by default + else: sf.source.sourceURI = util.removepathprefix(repo_uri, path) - # check component return sf except KeyboardInterrupt: