arcan1s/ahriman

Architecture required for subcommand add, but missing

Closed this issue · 8 comments

I set up this ahriman according to the documentation.
And finally I ran the following command and I get an error like this:

$ sudo -u ahriman ahriman -a x86_64 add yay --now
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.9/site-packages/ahriman/application/ahriman.py", line 394, in <module>
    run()
  File "/usr/lib/python3.9/site-packages/ahriman/application/ahriman.py", line 389, in run
    status = handler.execute(args)
  File "/usr/lib/python3.9/site-packages/ahriman/application/handlers/handler.py", line 66, in execute
    architectures = cls.extract_architectures(args)
  File "/usr/lib/python3.9/site-packages/ahriman/application/handlers/handler.py", line 100, in extract_architectures
    raise MissingArchitecture(args.command)
ahriman.core.exceptions.MissingArchitecture: Architecture required for subcommand add, but missing

After fixing this, I'm trying to build a repository using my original PKGBUILD.

there was a bug introduced by #21, fixed this behavior in 59f2992 (1.4.1)

Still it can be handled by

  1. sudo -u ahriman ahriman -a x86_64 init
  2. sudo -u ahriman ahriman add yay --now
    but setup instruction does not mention ability to run without setting architecture

I have updated to 1.4.1, and run sudo -u ahriman ahriman -a x86_64 add yay --now.
But ahriman exit without any message and exit code is not 0.
What should I do ?
image

default logging configuration writes log messages to /dev/log, which can be accessed by journalctl (without sudo, it is user log). It can be also changed by editing /etc/ahriman.d/logging.ini, replacing the lines handlers (e.g. https://github.com/arcan1s/ahriman/blob/master/package/etc/ahriman.ini.d/logging.ini#L32) from handlers = syslog_handler to handlers = console_handler, something like

sudo sed -i 's/handlers = syslog_handler/handlers = console_handler/g' /etc/ahriman.d/logging.ini

I have got the following error. Does this mean that ahriman should be run as root?
And I tried to run it with --unsafe but it was an unrecognized argument.
image

what does ls -ld /var/lib/ahriman say?
i think for some reasons it has root:root owner 🤔 In case if it is, the issue can be fixed by chown -R ahriman:ahriman /var/lib/ahriman

Regarding the unsafe option it should be applied to the command itself, e.g. ahriman --unsafe add ...

yeah, I have finally created a setup job and it should be now fixed via ab8ca16#diff-a4c8ce1b15ffdb9dcf57acc665ec6d1454c11c2599d0ce6027c2f7e74eba7cff for any new installation

command sudo chown -R ahriman:ahriman /var/lib/ahriman should fix your issue

Thanks! That seems to be nice!
I'll check it.

multiple fixes were applied in order to handle cases from this issue. Since 1.5.0 has been released, I'm closing this issue