Add dependency on "which"

Description:

mugshot implicitly depends on which being installed:

https://github.com/bluesabre/mugshot/blob/8ae3fdcb8318d0a64311a5daef14127aeaac5a34/mugshot/MugshotWindow.py#L48-L57

Related forum thread: https://bbs.archlinux.org/viewtopic.php?id=304960

Additional info:

  • package version(s): mugshot 0.4.3-4
  • config and/or log files: Below
  • link to upstream bug report, if any: N/A

Backtrace:

Traceback (most recent call last):
  File "/usr/bin/mugshot", line 36, in <module>
    mugshot.main()
    ~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/mugshot/__init__.py", line 47, in main
    window = MugshotWindow.MugshotWindow()
  File "/usr/lib/python3.13/site-packages/mugshot_lib/Window.py", line 53, in __new__
    new_object.finish_initializing(builder)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/mugshot/MugshotWindow.py", line 184, in finish_initializing
    if get_has_camera_support():
       ~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/mugshot/MugshotWindow.py", line 119, in get_has_camera_support
    if not which('gst-inspect-1.0'):
           ~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/mugshot/MugshotWindow.py", line 51, in which
    command = subprocess.Popen(['which', command],
              ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
                               stdout=subprocess.PIPE).stdout.read().strip()
                               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/subprocess.py", line 1038, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        pass_fds, cwd, env,
                        ^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
                        gid, gids, uid, umask,
                        ^^^^^^^^^^^^^^^^^^^^^^
                        start_new_session, process_group)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/subprocess.py", line 1974, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'which'

Steps to reproduce:

  • sudo pacman -S mugshot
  • sudo pacman -R base-devel which
  • Run mugshot to trigger an exception
    • Note: You will need a device at /dev/video0 to see the issue