diff --git a/docs/vscode-deb-setup.sh b/docs/vscode-deb-setup.sh index c4ad5c1..ce9b36d 100644 --- a/docs/vscode-deb-setup.sh +++ b/docs/vscode-deb-setup.sh @@ -5,24 +5,26 @@ # # USAGE: cat vscode-deb-setup.sh # -# DESCRIPTION: TailsOS (tested v4.12) already comes with git cli command. This -# doc explain one way to configure a new account. And suggest -# extra optionated packages (git-gui, gitk) +# DESCRIPTION: Install VSCode from .deb file on Tails. # # OPTIONS: --- # REQUIREMENTS: --- -# BUGS: --- +# BUGS: 1. As for Tails v4.12, this script have some bugs. Consider +# using the alternative vscode-portable-setup.sh # NOTES: --- # AUTHOR: Emerson Rocha # COMPANY: Etica.AI # LICENSE: Public Domain -# VERSION: 1.2 +# VERSION: 1.3 # CREATED: 2020-10-17 12:27 UTC # REVISION: 2020-10-17 10:57 UTC v1.1 re-started. The vscode-portable-setup.sh v1.0 # was deleted by mistake (around ~30min of # work lost). TailsOS don't have a trash # feature and even VSCode warned # 2020-10-17 12:41 UTC v1.2 (fork from vscode-portable-setup.sh v1.1) +# 2020-10-23 15:11 UTC v1.3 Explain Hotfix for apt_hook_pre() on +# /usr/local/sbin/tails-additional-software +# to be able to install debs. #=============================================================================== echo "Usage:" echo " cat vscode-deb-setup.sh" @@ -39,21 +41,26 @@ mkdir /home/amnesia/Persistent/downloads #### 2. Download and install VSCode deb _________________________________________ # @see https://code.visualstudio.com/docs/editor/portable -# Choose ONE of the following steps - -### 2.1 /home/amnesia/Persistent/downloads/vscode.deb (Persistent installer) ..... -wget https://go.microsoft.com/fwlink/?LinkID=760868 -O /home/amnesia/Persistent/downloads/vscode.deb -# sudo apt update -sudo apt install /home/amnesia/Persistent/downloads/vscode.deb - - -### 2.2 /tmp/vscode.deb (Download on RAM) ......................................... +### 2 /home/amnesia/Persistent/downloads/vscode.deb (Persistent installer) ..... wget https://go.microsoft.com/fwlink/?LinkID=760868 -O /tmp/vscode.deb -# sudo apt update +sudo apt update sudo apt install /tmp/vscode.deb - -# Delete the /tmp file to allow system free memory rm -f /tmp/vscode.deb -#### README: example not working __________________________________________________ -# @see https://github.com/fititnt/TailsOS-for-non-whistleblowers/issues/1#issuecomment-710931772 \ No newline at end of file +#### HOTFIX: Error "KeyError: "The cache has no package named 'code'"" +# @see https://github.com/fititnt/TailsOS-for-non-whistleblowers/issues/12#issuecomment-715442018 +# This error happens on at least on Tails v4.11 / v4.12. You should ONLY do it +# if step 2 'sudo apt install /tmp/vscode.deb' fails with error message +# KeyError: "The cache has no package named 'code'"" +# +# sudo gedit /usr/local/sbin/tails-additional-software +# Change this +## if action.endswith(".deb"): +## # Filter packages that will only be upgraded +## if not apt_cache[package_name].is_installed: +## installed_packages.append(package_name) +# for this +## if action.endswith(".deb"): +## # Filter packages that will only be upgraded +## if (package_name not in apt_cache) or apt_cache[package_name].is_installed: +## installed_packages.append(package_name) \ No newline at end of file