summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
Diffstat (limited to 'apt')
-rw-r--r--apt/__init__.py2
-rw-r--r--apt/cache.py6
-rw-r--r--apt/progress.py4
3 files changed, 10 insertions, 2 deletions
diff --git a/apt/__init__.py b/apt/__init__.py
index eb4e3268..2a478b34 100644
--- a/apt/__init__.py
+++ b/apt/__init__.py
@@ -7,7 +7,7 @@ import os
from apt.package import Package
from apt.cache import Cache
from apt.progress import OpProgress, FetchProgress, InstallProgress, CdromProgress
-from apt_pkg import SizeToStr, VersionCompare
+from apt_pkg import SizeToStr, TimeToStr, VersionCompare
# init the package system
apt_pkg.init()
diff --git a/apt/cache.py b/apt/cache.py
index 50a896e6..83f0bd3d 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -103,6 +103,12 @@ class Cache(object):
self._depcache.Upgrade(distUpgrade)
self.cachePostChange()
+ def update(self, fetchProgress=None, opProgress=None):
+ if(opProgress != None):
+ self._cache.Update(fetchProgress, opProgress);
+ else:
+ self._cache.Update(fetchProgress);
+
def commit(self, fprogress, iprogress):
""" Apply the marked changes to the cache """
self._depcache.Commit(fprogress, iprogress)
diff --git a/apt/progress.py b/apt/progress.py
index 4e5ffe4d..70696b6b 100644
--- a/apt/progress.py
+++ b/apt/progress.py
@@ -61,11 +61,13 @@ class FetchProgress:
pass
def pulse(self):
- pass
+ return True
def mediaChange(self, medium, drive):
pass
+
+
class InstallProgress:
""" Report the install progress
Subclass this class to implement install progress reporting