summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
Diffstat (limited to 'apt')
-rw-r--r--apt/cache.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 65f3c9d9..dc2f5522 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -166,6 +166,7 @@ class Cache(object):
os.close(lock)
def update(self, fetchProgress=None):
+ " run the equivalent of apt-get update "
lockfile = apt_pkg.Config.FindDir("Dir::State::Lists") + "lock"
lock = apt_pkg.GetLock(lockfile)
if lock < 0:
@@ -174,14 +175,7 @@ class Cache(object):
try:
if fetchProgress == None:
fetchProgress = apt.progress.FetchProgress()
- fetcher = apt_pkg.GetAcquire(fetchProgress)
- # this can throw a exception
- self._list.GetIndexes(fetcher)
- # now run the fetcher, throw exception if something fails to be
- # fetched
- if self._runFetcher(fetcher) == fetcher.ResultContinue:
- return True
- return False
+ return self._cache.Update(fetchProgress, self._list)
finally:
os.close(lock)