Comment 14 for bug 1876370

Revision history for this message
Alberto Donato (ack) wrote :

I think I've found the culprit.
When building with `--destructive-mode` (on focal) the content of the resulting pyvenv.cfg ends up containing:

home = /home/ack/canonical/src/crbs/parts/crbs/build/.ve/bin
include-system-site-packages = false
version = 3.8.2

whereas with a `--use-lxd` build it has

home = /root/stage/bin
include-system-site-packages = false
version = 3.8.2

Note that in the former the .ve/ dir is a virtualenv for development which gets picked up because of the part `source-type: local`.
If I remove it and build with `--destructive-mode`, the pyvenv.cfg is like this:

home = /usr/bin
include-system-site-packages = false
version = 3.8.2

Shouldn't `home` in there always point to /usr/bin as that's where python is in the base used by the snap? Even in the `--use-lxd` case which seems to always work, if there was a different python in /root/stage/bin, it could break things. Or perhaps the home setting is not needed at all, and it can be always set to nothing?