Skip to content

Commit

Permalink
Removed extra apt-get update in apt install command
Browse files Browse the repository at this point in the history
When a command like "sudo su -c "apt-get update && apt-get install" was
executed via subprocess.popen, the parent python process was suspended when the first
part of the command completed. We don't need the update anymore (it's done by the user
before running securedrop-admin setup) so let's just simplify things and run something
like "sudo apt-get install"
  • Loading branch information
zenmonkeykstop committed Feb 5, 2024
1 parent 867cc55 commit 2ece942
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions admin/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,7 @@ def install_apt_dependencies(args: argparse.Namespace) -> None:
" which was set on Tails login screen"
)

apt_command = [
"sudo",
"su",
"-c",
f"apt-get update && \
apt-get -q -o=Dpkg::Use-Pty=0 install -y {APT_DEPENDENCIES_STR}",
]
apt_command = f"sudo apt-get -q -o=Dpkg::Use-Pty=0 install -y {APT_DEPENDENCIES_STR}".split(" ")

try:
# Print command results in real-time, to keep Admin apprised
Expand Down

0 comments on commit 2ece942

Please sign in to comment.