From 5fc10404ee7f19a866fb454ffb37e45608f7f708 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Wed, 1 Nov 2006 19:23:28 +0000 Subject: [PATCH] * cached info for total progress --- pisi/package.py | 3 ++- pisi/ui.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pisi/package.py b/pisi/package.py index 14cf5c55..14cd382d 100644 --- a/pisi/package.py +++ b/pisi/package.py @@ -12,7 +12,7 @@ """package abstraction methods to add/remove files, extract control files""" -from os.path import join, exists, basename, dirname +from os.path import join, exists, basename, dirname, getsize import gettext __trans = gettext.translation('pisi', fallback=True) @@ -59,6 +59,7 @@ class Package: raise else: ctx.ui.info(_('%s [cached]') % url.filename()) + ctx.ui.notify(pisi.ui.cached, name = url.filename(), size = getsize(self.filepath)) def add_to_package(self, fn, an=None): """Add a file or directory to package""" diff --git a/pisi/ui.py b/pisi/ui.py index 086528a8..63fed5d1 100644 --- a/pisi/ui.py +++ b/pisi/ui.py @@ -18,7 +18,7 @@ import pisi import pisi.context as ctx (installed, upgraded, removed, installing, removing, configuring, configured, extracting, - downloading, packagestogo, updatingrepo) = range(11) + downloading, packagestogo, updatingrepo, cached) = range(12) class UI(object): "Abstract class for UI operations, derive from this."