snapcraft: fix probert, add curtin runners

Make it so that probert and curtin can be run from the snap.  Invoked as
subiquity.probert and subiquity.curtin respectively.
This commit is contained in:
Dan Bungert 2023-07-27 14:38:52 -06:00
parent cb37d581b5
commit 7d8499e36a
2 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,3 @@
#!/bin/sh #!/bin/sh
export PYTHONPATH=$PYTHONPATH:$SNAP/lib/python3.10/site-packages export PYTHONPATH=$PYTHONPATH:$SNAP/lib/python3.10/site-packages
$PYTHON -m subiquity "$@" exec "$@"

View File

@ -10,7 +10,7 @@ contact: https://bugs.launchpad.net/subiquity/+filebug
apps: apps:
subiquity: subiquity:
command: usr/bin/subiquity-cmd command: usr/bin/subiquity-cmd $SNAP/usr/bin/python3.10 -m subiquity
environment: environment:
# Save original values of environment variables, we want to restore them # Save original values of environment variables, we want to restore them
# for the debug shell (LP: #1975629) and restart (LP: #1978139) # for the debug shell (LP: #1975629) and restart (LP: #1978139)
@ -23,7 +23,16 @@ apps:
PYTHON_ORIG: $PYTHON PYTHON_ORIG: $PYTHON
PYTHON: $SNAP/usr/bin/python3.10 PYTHON: $SNAP/usr/bin/python3.10
probert: probert:
command: bin/probert command: usr/bin/subiquity-cmd $SNAP/usr/bin/python3.10 $SNAP/bin/probert
environment:
PYTHON: $SNAP/usr/bin/python3.10
curtin:
command: usr/bin/subiquity-cmd $SNAP/bin/curtin
environment:
PYTHONIOENCODING: utf-8
PYTHON: $SNAP/usr/bin/python3.10
PY3OR2_PYTHON: $SNAP/usr/bin/python3.10
PATH: $PATH:$SNAP/bin
subiquity-server: subiquity-server:
command: usr/bin/subiquity-server command: usr/bin/subiquity-server
daemon: simple daemon: simple