Comment 0 for bug 1820604

Revision history for this message
Dimitri John Ledkov (xnox) wrote : curtin fails to find itself in subiquity snap

sudo snap install subiquity --classic
export SNAP=/snap/subiquity/664
export PYTHONPATH=/snap/subiquity/664/lib/python3.6/site-packages/

$ /snap/subiquity/664/usr/bin/python3 -c 'import curtin.util; print(curtin.util.get_paths())'
{'curtin_exe': None,
 'lib': '/snap/subiquity/664/lib/python3.6/site-packages/curtin',
 'helpers': '/snap/subiquity/664/usr/lib/curtin/helpers'}

I think this is due to curtin getting installed as bin/curtin, not as usr/bin/curtin inside the subiquity snap.

Note that:

$ /snap/subiquity/664/usr/bin/python3 -c 'import curtin.util; print(curtin.util._installed_file_path("usr/bin/curtin"))'
None

yet

/snap/subiquity/664/usr/bin/python3 -c 'import curtin.util; print(curtin.util._installed_file_path("bin/curtin"))'
/snap/subiquity/664/bin/curtin <- winner

I don't know if we should be forcing subiquity snapcraft to install curtin into usr/bin, or if curtin code should be tweaked to try to detect curtin in $SNAP/bin/curtin.

Or like if we should append $SNAP/bin to $PATH.