diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-12-11 10:42:00 -0800 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-12-11 10:42:00 -0800 |
| commit | 4dcfce5fd58b99b9aaf6acb2ab86d811b1f1a01d (patch) | |
| tree | 6abf7bc271ad4b9399d4733dbac3475d3a87ec0d | |
| parent | 037edcfd52130c0db375f19867b25ffe46f40f94 (diff) | |
| download | python-apt-4dcfce5fd58b99b9aaf6acb2ab86d811b1f1a01d.tar.gz | |
- new method "getRequiredDownload()"
- new method "additionalRequiredSpace()"
| -rw-r--r-- | apt/cache.py | 11 | ||||
| -rw-r--r-- | debian/changelog | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py index 3c032052..79e58282 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -129,6 +129,17 @@ class Cache(object): self.cachePostChange() @property + def requiredDownload(self): + """ get the size of the packages that are required to download """ + pm = apt_pkg.GetPackageManager(self._depcache) + fetcher = apt_pkg.GetAcquire() + pm.GetArchives(fetcher, self._list, self._records) + return fetcher.FetchNeeded + @property + def additionalRequiredSpace(self): + """ get the size of the additional required space on the fs """ + return self._depcache.UsrSize + @property def reqReinstallPkgs(self): " return the packages not downloadable packages in reqreinst state " reqreinst = set() diff --git a/debian/changelog b/debian/changelog index e812fe32..3c3ae251 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ python-apt (0.7.9) UNRELEASED; urgency=low * apt/cache.py: - new method "isVirtualPackage()" - new method "getProvidingPackages()" + - new method "getRequiredDownload()" + - new method "additionalRequiredSpace()" * apt/debfile.py: - move a lot of the gdebi code into this file, this provides interfaces for querrying and installing |
