From da5d97788a82c5edbb8cd3c71eb4904f41b1b276 Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Sun, 4 Dec 2022 23:45:10 +0200 Subject: [PATCH] do not update database via pacman, use ahriman's own databses --- Dockerfile | 2 +- docker/entrypoint.sh | 2 -- src/ahriman/application/handlers/shell.py | 5 +++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c511b2f6..c811e85d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,4 +51,4 @@ VOLUME ["/var/lib/ahriman"] COPY "docker/entrypoint.sh" "/usr/local/bin/entrypoint" ENTRYPOINT ["entrypoint"] # default command -CMD ["repo-update"] +CMD ["repo-update", "--refresh"] diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index c5ab0f6e..cd4f7192 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -47,8 +47,6 @@ if [ -n "$AHRIMAN_UNIX_SOCKET" ]; then fi ahriman "${AHRIMAN_DEFAULT_ARGS[@]}" repo-setup "${AHRIMAN_SETUP_ARGS[@]}" -# refresh database -pacman -Syy &> /dev/null # create machine-id which is required by build tools systemd-machine-id-setup &> /dev/null diff --git a/src/ahriman/application/handlers/shell.py b/src/ahriman/application/handlers/shell.py index 05f069d9..bda8cddb 100644 --- a/src/ahriman/application/handlers/shell.py +++ b/src/ahriman/application/handlers/shell.py @@ -56,7 +56,8 @@ class Shell(Handler): # licensed by https://creativecommons.org/licenses/by-sa/3.0 path = Path(sys.prefix) / "share" / "ahriman" / "templates" / "shell" StringPrinter(path.read_text(encoding="utf8")).print(verbose=False) + # we only want to pass application isntance inside if args.code is None: - code.interact(local=locals()) + code.interact(local={"application": application}) else: - code.InteractiveConsole(locals=locals()).runcode(args.code) + code.InteractiveConsole(locals={"application": application}).runcode(args.code)