Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 025d509

Browse files
committed
Clean: Use newer apt instead of apt-get.
1 parent c4e5bde commit 025d509

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docker/docker_tools.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def check_install(
9595
# Only run with ``sudo`` if we're not root.
9696
([] if is_root else ["sudo"])
9797
+ [
98-
"apt-get",
98+
"apt",
9999
"install",
100100
"-y",
101101
"--no-install-recommends",
@@ -277,7 +277,7 @@ def init(
277277
xqt("git --version")
278278
except Exception as e:
279279
print(f"Unable to run git: {e} Installing...")
280-
xqt("sudo apt-get install -y --no-install-recommends git")
280+
xqt("sudo apt install -y --no-install-recommends git")
281281
# Are we inside the Runestone repo?
282282
if not (wd / "nginx").is_dir():
283283
change_dir = True
@@ -310,7 +310,7 @@ def init(
310310
"sudo dscl . append /Groups/www-data GroupMembership $USER",
311311
)
312312
else:
313-
xqt('sudo usermod -a -G www-data "$USER"')
313+
xqt('sudo usermod -a -G www-data $USER')
314314
did_group_add = True
315315

316316
# Provide server-related CLIs. While installing this sooner would be great, we can't assume that the prereqs (the downloaded repo) are available.
@@ -647,13 +647,13 @@ def _build_phase_1(
647647

648648
# Set up apt correctly; include Postgres repo.
649649
xqt(
650-
"apt-get update",
651-
"apt-get install -y --no-install-recommends eatmydata lsb-release",
650+
"apt update",
651+
"apt install -y --no-install-recommends eatmydata lsb-release",
652652
"""echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list""",
653653
"wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -",
654-
"apt-get update",
654+
"apt update",
655655
)
656-
apt_install = "eatmydata apt-get install -y --no-install-recommends"
656+
apt_install = "eatmydata apt install -y --no-install-recommends"
657657
# This uses apt; run it after apt is set up.
658658
check_install_curl()
659659

@@ -748,8 +748,8 @@ def _build_phase_1(
748748
#
749749
# Needed to run sim30: per https://unix.stackexchange.com/questions/486806/steam-missing-32-bit-libraries-libx11-6, enable 32-bit libs.
750750
"eatmydata dpkg --add-architecture i386",
751-
"eatmydata apt-get update",
752-
"eatmydata apt-get install -y lib32stdc++6 libc6:i386",
751+
"eatmydata apt update",
752+
"eatmydata apt install -y lib32stdc++6 libc6:i386",
753753
# Then download and install MPLAB X.
754754
f'eatmydata wget --no-verbose "https://ww1.microchip.com/downloads/en/DeviceDoc/{MPLABX_VERSION}"',
755755
f'eatmydata tar -xf "{MPLABX_VERSION}"',
@@ -840,11 +840,11 @@ def _build_phase_1(
840840

841841
xqt(
842842
# Do any final updates.
843-
"eatmydata sudo apt-get -y update",
844-
"eatmydata sudo apt-get -y upgrade",
843+
"eatmydata sudo apt -y update",
844+
"eatmydata sudo apt -y upgrade",
845845
# Clean up after install.
846-
"eatmydata sudo apt-get -y autoclean",
847-
"eatmydata sudo apt-get -y autoremove",
846+
"eatmydata sudo apt -y autoclean",
847+
"eatmydata sudo apt -y autoremove",
848848
"rm -rf /tmp/* /var/tmp/*",
849849
)
850850

0 commit comments

Comments
 (0)