do not update database via pacman, use ahriman's own databses

This commit is contained in:
Evgenii Alekseev 2022-12-04 23:45:10 +02:00
parent 0e839fbbf2
commit da5d97788a
3 changed files with 4 additions and 5 deletions

View File

@ -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"]

View File

@ -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

View File

@ -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)