* cached info for total progress
This commit is contained in:
+2
-1
@@ -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
@@ -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."
|
||||||
|
|||||||
Reference in New Issue
Block a user