[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#622347: python-apt: Please add a public function fetch_archives



On Di, 2011-04-12 at 13:20 +0200, Patrick Schoenfeld wrote:
> Package: python-apt
> Version: 0.7.100.2
> Severity: wishlist
> 
> Hi,
> 
> I'm currently working on a python-apt based variant of fai-mirror,
> which uses python-apt to resolve dependencies for the packages
> and download them. Currently the only way to NOT install packages and download
> them only is to use an internal function _fetch_archives for example like this:
> 
> fetch_progress = apt.progress.text.AcquireProgress()
> depcache = self.cache._depcache
> pm = apt_pkg.PackageManager(depcache)
> fetcher = apt_pkg.Acquire(fetch_progress)
> self.cache._fetch_archives(fetcher, pm)
> 
> Its obvious that this is quiet unfortunate. Therefore it would be nice,
> if python-apt supported a method which allows fetching packages only.

You can fetch single versions by using Version.fetch_binary(), or go
through the list of all changed packages and mark the URIs for download
(via Version.uri). But if really wanted we could surely at a public
fetch_archives method.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.





Reply to: