Skip to content

Commit

Permalink
snapcraft: fix probert, add curtin runners
Browse files Browse the repository at this point in the history
Make it so that probert and curtin can be run from the snap.  Invoked as
subiquity.probert and subiquity.curtin respectively.
  • Loading branch information
dbungert committed Aug 2, 2023
1 parent cb37d58 commit 7d8499e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 1 addition & 2 deletions bin/subiquity-cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/sh

export PYTHONPATH=$PYTHONPATH:$SNAP/lib/python3.10/site-packages
$PYTHON -m subiquity "$@"
exec "$@"
13 changes: 11 additions & 2 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contact: https://bugs.launchpad.net/subiquity/+filebug

apps:
subiquity:
command: usr/bin/subiquity-cmd
command: usr/bin/subiquity-cmd $SNAP/usr/bin/python3.10 -m subiquity
environment:
# Save original values of environment variables, we want to restore them
# for the debug shell (LP: #1975629) and restart (LP: #1978139)
Expand All @@ -23,7 +23,16 @@ apps:
PYTHON_ORIG: $PYTHON
PYTHON: $SNAP/usr/bin/python3.10
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:
command: usr/bin/subiquity-server
daemon: simple
Expand Down

0 comments on commit 7d8499e

Please sign in to comment.