Skip to content

Commit

Permalink
Merge pull request #614 from jeffmcjunkin/patch-16
Browse files Browse the repository at this point in the history
Move to apt-fast if available on Debian and derivates
  • Loading branch information
HackingDave committed May 24, 2024
2 parents c40ffe7 + 3f7a968 commit 282d34d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/platforms/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ def base_install_modules(module_name):
# depends
if counter == 1:
for module in modules:
command = ("apt-get -q --allow-downgrades --allow-remove-essential --allow-change-held-packages -y install " + module)
# Check if `apt-fast` is available, otherwise use apt-get
if subprocess.Popen("which apt-fast >/dev/null", shell=True).wait() == 0:
command = ("apt-fast -y install " + module)
else:
command = ("apt-get -q --allow-downgrades --allow-remove-essential --allow-change-held-packages -y install " + module)
subprocess.Popen("export DEBIAN_FRONTEND=noninteractive;%s" %
command, shell=True).wait()
command, shell=True).wait()
else:
command = ("apt-get -q --allow-downgrades --allow-remove-essential --allow-change-held-packages -y install " + modules)
subprocess.Popen("export DEBIAN_FRONTEND=noninteractive;%s" %
Expand Down

0 comments on commit 282d34d

Please sign in to comment.