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."