* cached info for total progress

This commit is contained in:
Faik Uygur
2006-11-01 19:23:28 +00:00
parent cebe541eb7
commit 5fc10404ee
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -12,7 +12,7 @@
"""package abstraction methods to add/remove files, extract control files""" """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 import gettext
__trans = gettext.translation('pisi', fallback=True) __trans = gettext.translation('pisi', fallback=True)
@@ -59,6 +59,7 @@ class Package:
raise raise
else: else:
ctx.ui.info(_('%s [cached]') % url.filename()) 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): def add_to_package(self, fn, an=None):
"""Add a file or directory to package""" """Add a file or directory to package"""
+1 -1
View File
@@ -18,7 +18,7 @@ import pisi
import pisi.context as ctx import pisi.context as ctx
(installed, upgraded, removed, installing, removing, configuring, configured, extracting, (installed, upgraded, removed, installing, removing, configuring, configured, extracting,
downloading, packagestogo, updatingrepo) = range(11) downloading, packagestogo, updatingrepo, cached) = range(12)
class UI(object): class UI(object):
"Abstract class for UI operations, derive from this." "Abstract class for UI operations, derive from this."