Merge pull request #733 from morphis/enable-debug-per-snap-config
Add snap configure hook to allow enable debug mode
This commit is contained in:
commit
3d5ea7fbdd
4 changed files with 17 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,7 +2,6 @@ build*/
|
|||
parts/
|
||||
stage/
|
||||
prime/
|
||||
snap/
|
||||
android-images/
|
||||
*.snap
|
||||
CMakeLists.txt.user
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ start() {
|
|||
$SNAP/sbin/apparmor_parser -r $SNAP/apparmor/anbox-container.aa
|
||||
fi
|
||||
|
||||
if [ -e "$SNAP_COMMON"/.enable_debug ]; then
|
||||
export ANBOX_LOG_LEVEL=debug
|
||||
fi
|
||||
|
||||
exec $AA_EXEC $SNAP/bin/anbox-wrapper.sh container-manager \
|
||||
--data-path=$DATA_PATH \
|
||||
--android-image=$ANDROID_IMG \
|
||||
|
|
|
|||
|
|
@ -29,4 +29,8 @@ export XDG_DATA_HOME="$SNAP_USER_COMMON/app-data"
|
|||
# configured but the actual EGL implementation is missing.
|
||||
export __EGL_VENDOR_LIBRARY_DIRS="$SNAP/glvnd"
|
||||
|
||||
if [ -e "$SNAP_COMMON"/.enable_debug ]; then
|
||||
export ANBOX_LOG_LEVEL=debug
|
||||
fi
|
||||
|
||||
exec $SNAP/usr/bin/anbox $@
|
||||
|
|
|
|||
9
snap/hooks/configure
vendored
Executable file
9
snap/hooks/configure
vendored
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$(snapctl get debug.enable)" = true ]; then
|
||||
touch "$SNAP_COMMON"/.enable_debug
|
||||
else
|
||||
rm -f "$SNAP_COMMON"/.enable_debug
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue