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

Re: Change of APT interface

On 9 July 2014 21:30, Jimmy Kaplowitz <jkaplowitz@google.com> wrote:
Apt-key could probably be replaced by the trusted keys functionality that already exists in bootstrap-vz, I think, or an improved version of it.

Switching to python-apt seems right in general, but is it worth the disruption? Maybe yes, but it's tough to be sure.

- Jimmy

On Wed, Jul 9, 2014 at 12:23 PM, Tomasz Rybak <tomasz.rybak@post.pl> wrote:
I've looked at the usage of apt in bootstrap-vz,
and at python-apt

Changing bootstrap-vz to use python-apt instead of calling
apt-{get,cache} should be possible without much problems
but would mean:
1. removal of base.pkg.sourcelist and base.pkg.packagelist
2. keeping objects from python-apt in info.source_list
and info.package_list
3. need to change manifest schema not to store lines
from /etc/apt/sources.list but to store tuples
(or dicts) according to arguments accepted
by apt.sourceslist
4. changing AddManifetsSources, AddDefaultSources, WriteSources
to use python-apt.

I do not know how to replace apt-key, but this is only used when
building GCE images.
I also do not know what is the best way to ensure --no-recommends
and -y.
OTOH by using python-apt we could avoid the need for cleaning
package cache - apt.cache allows for operations in memory, without
writing cache to disk.

Does anyone have some remarks? I would not like to start
such a change without some discussion, or at least some OK
from the group.

Best regards.

Tomasz Rybak  GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A  488E C654 FB33 2AD5 9860

I definitely think that python-apt is the way to go. You list quite a few changes that are required for this to work and some affect the manifest - I am not against that in any way and as long as 1.0 isn't out I am fine with changing the API (i.e. the structure of the manifest). However: besides the (albeit cool) feature of being able to hold the apt-cache in memory I don't see a whole lot of advantages of using python-apt right now - so: is it worth it?

Reply to: