diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2019-06-28 17:11:00 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2019-06-28 17:11:00 +0200 |
commit | 83a2a5b4937441b55431db3e7cd476c94f1adc25 (patch) | |
tree | 60819f3a19104b3dd5329a791c5088685d6bc689 | |
parent | 26748898daa1060593420fcb1d1f4cfa8006be3c (diff) |
[bug] use python3, newest ubuntu does not ship python bin
-rw-r--r-- | snap/Makefile | 2 | ||||
-rwxr-xr-x | snap/hooks/install | 4 | ||||
-rwxr-xr-x | snap/local/pre/pack_installers (renamed from snap/pre/pack_installers) | 7 |
3 files changed, 6 insertions, 7 deletions
diff --git a/snap/Makefile b/snap/Makefile index f00d3f6..0d76a6f 100644 --- a/snap/Makefile +++ b/snap/Makefile @@ -4,7 +4,7 @@ # to use policykit. helpers: - pre/pack_installers + local/pre/pack_installers build: helpers # for speeding up build, see https://tribaal.io/making-lxd-fly-on-ubuntu-as-well.html sudo snapcraft cleanbuild diff --git a/snap/hooks/install b/snap/hooks/install index 98469fe..c34abf4 100755 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # DO NOT MODIFY MANUALLY # This helper installs the polkit policy file # for the RiseupVPN snap. @@ -22,5 +22,5 @@ if 'ID=debian' in release: desktop_path = "/usr/share/applications/riseup-vpn.desktop" if os.path.exists(desktop_path): os.remove(desktop_path) - os.symlink("/snap/riseup-vpn/current/snap/gui/riseup-vpn.desktop", desktop_path) + os.symlink("/snap/riseup-vpn/current/snap/meta/gui/riseup-vpn.desktop", desktop_path) subprocess.call(['update-desktop-database']) diff --git a/snap/pre/pack_installers b/snap/local/pre/pack_installers index 827d16e..9cf7b15 100755 --- a/snap/pre/pack_installers +++ b/snap/local/pre/pack_installers @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# TODO move to local/ folder. import os import subprocess from base64 import encodestring as encode @@ -27,12 +26,12 @@ with open(os.path.join(HELPDIR, POLKIT_FILE)) as polkit: b64_polkit = encode(polkit.read().encode()) with open(INSTALL, 'w') as install: - install.write('#!/usr/bin/env python\n') + install.write('#!/usr/bin/env python3\n') install.write('# DO NOT MODIFY MANUALLY\n') install.write('# This helper installs the polkit policy file\n') install.write('# for the RiseupVPN snap.\n') install.write('# It is generated automatically\n') - install.write('# by the script at "snap/pre/pack_installers"\n') + install.write('# by the script at "snap/local/pre/pack_installers"\n') install.write('import subprocess\n') install.write('import os\n') install.write('from base64 import decodestring as decode\n') @@ -51,7 +50,7 @@ if 'ID=debian' in release: desktop_path = "/usr/share/applications/{app_name}.desktop" if os.path.exists(desktop_path): os.remove(desktop_path) - os.symlink("/snap/{app_name}/current/snap/gui/{app_name}.desktop", desktop_path) + os.symlink("/snap/{app_name}/current/snap/meta/gui/{app_name}.desktop", desktop_path) subprocess.call(['update-desktop-database']) """.format( polkit=b64_polkit, |