diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-09-03 12:08:20 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-09-03 12:08:20 +0200 |
| commit | 56494ed686d4e379f8fc449323232503295c1c1e (patch) | |
| tree | 3d8d44c5caef61c576767d268a5eec6a885b9344 | |
| parent | 297adb794c0f2548ea45dc3582ae0912724fcf9c (diff) | |
| download | python-apt-56494ed686d4e379f8fc449323232503295c1c1e.tar.gz | |
apt/cache.py: use alternative SourceList if sources_list is used
| -rw-r--r-- | apt/cache.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apt/cache.py b/apt/cache.py index 585fca0a..586df366 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -349,13 +349,16 @@ class Cache(object): apt_pkg.config.set("Dir::Etc::sourcelist", os.path.abspath(sources_list)) apt_pkg.config.set("Dir::Etc::sourceparts", "xxx") apt_pkg.config.set("APT::List-Cleanup", "0") - self._list.read_main_list() + slist = apt_pkg.SourceList() + slist.read_main_list() + else: + slist = self._list try: if fetch_progress is None: fetch_progress = apt.progress.base.AcquireProgress() try: - res = self._cache.update(fetch_progress, self._list, + res = self._cache.update(fetch_progress, slist, pulse_interval) except SystemError, e: raise FetchFailedException(e) @@ -369,7 +372,6 @@ class Cache(object): apt_pkg.config.set("Dir::Etc::sourcelist", old_sources_list) apt_pkg.config.set("Dir::Etc::sourceparts", old_sources_list_d) apt_pkg.config.set("APT::List-Cleanup", old_cleanup) - self._list.read_main_list() @deprecated_args def install_archives(self, pm, install_progress): |
