Dnia 2014-07-09, śro o godzinie 21:36 +0200, Anders Ingemann pisze: > On 9 July 2014 21:30, Jimmy Kaplowitz <jkaplowitz@google.com> wrote: [ cut ] > Switching to python-apt seems right in general, but is it > worth the disruption? Maybe yes, but it's tough to be sure. [ cut ] > 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? I assume that calling of apt-get and family is left-over from the times when build-debian-cloud was written as set of shell scripts. It was natural approach then, and was translated to bootstrap-vz. I did the same when moving GCE provider to Python. It looks like there is consensus that going to python-apt is The Good Thing, but you have worries about cost of doing it. First some disadvantages. 1. It seems that only I know some of python-apt, although my knowledge of it is limited. For example I still do not know what is the best way of passing equivalent of "--assume-yes" and I am not always sure whether to use apt, or more low-level apt_pkg. 2. It'll require change in manifest. 3. Everyone knows apt-get so everyone working on bootstrap-vz knows what commands in particular plugins are doing. Advantages. 1. IMO it is the correct way of interacting with apt. Now we are trying to steer apt and family through CLI which limits us. Besides - now we use apt-get, while it seems that apt is preferred way of managing packages. 2. It'll reduce number of called processes. It is not the biggest cost in building images, and it might be premature optimization, but I like this. 3. We are still before 1.0 so now it'd be right time to do it. After 1.0, and after more people will use bootstrap-vz, it might be harder to perform this change. 4. We will be able to delete some code from base.pkg. I do not see one obvious killer feature which would speak for python-apt. It's more sum of small things - like the ability to get list of available versions of packages and decide which of them to install, read package metadata and see what it depends on or what are its conflicts. IMO it could allow us in long term to have some plugins or code which would interact more deeply with package subsystem. But for now I do not know python-apt deeply enough so I cannot see what are far-away advantages of this move. Best regards. -- Tomasz Rybak GPG/PGP key ID: 2AD5 9860 Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860 http://member.acm.org/~tomaszrybak
Attachment:
signature.asc
Description: This is a digitally signed message part