Package Details: caffeine 2.9.12-1

Git Clone URL: https://aur.archlinux.org/caffeine.git (read-only, click to copy)
Package Base: caffeine
Description: Keep your computer awake.
Upstream URL: https://launchpad.net/caffeine
Licenses: GPL3
Submitter: micwoj92
Maintainer: None
Last Packager: micwoj92
Votes: 2
Popularity: 0.001809
First Submitted: 2022-06-12 03:25 (UTC)
Last Updated: 2022-07-18 01:23 (UTC)

Dependencies (5)

Required by (1)

Sources (1)

Latest Comments

micwoj92 commented on 2022-08-02 07:21 (UTC)

Try searching that error on internet. It seems to have different solutions and I don't know your setup so unfortunately I am not able to help you.

holyArch commented on 2022-08-01 18:16 (UTC) (edited on 2022-08-01 18:20 (UTC) by holyArch)

It crashes.

Traceback (most recent call last):
  File "/usr/bin/caffeine", line 38, in <module>
    ewmh = EWMH()
  File "/usr/lib/python3.10/site-packages/ewmh/ewmh.py", line 70, in __init__
    self.display = _display or display.Display()
  File "/usr/lib/python3.10/site-packages/Xlib/display.py", line 89, in __init__
    self.display = _BaseDisplay(display)
  File "/usr/lib/python3.10/site-packages/Xlib/display.py", line 71, in __init__
    protocol_display.Display.__init__(self, *args, **keys)
  File "/usr/lib/python3.10/site-packages/Xlib/protocol/display.py", line 166, in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0.0": b'Invalid MIT-MAGIC-COOKIE-1 key'

Raansu commented on 2022-07-12 14:39 (UTC)

I'm using Gnome and Wayland here but it seems to be down to the use of 'xdg-screensaver'. The 'xdg-utils' Arch Linux package has 'perl-net-dbus' and 'perl-x11-protocol' listed as optdepends for 'xdg-screensaver'. It's only an issue if your system makes use of 'xdg-screensaver'

micwoj92 commented on 2022-07-12 12:10 (UTC) (edited on 2022-07-12 12:12 (UTC) by micwoj92)

I do not have this issue with indicator on my 2 pcs. I don't think that caffeine contains a single line of perl code, so I this this is highly improbable that it needs some perl modules. Maybe you are using some panel/desktop environment that uses perl for that. I have no idea, using lxde and xfce4 here, both on x11.

Also this package states optdependency on libayatana-appindicator, without it i have this error

Traceback (most recent call last):
  File "/usr/bin/caffeine-indicator", line 32, in <module>
    gi.require_version('AyatanaAppIndicator3', '0.1')
  File "/usr/lib/python3.10/site-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace AyatanaAppIndicator3 not available

Raansu commented on 2022-07-12 11:23 (UTC)

@micwoj92 one more issue. 'caffeine-indicator' will fail to work if 'perl-net-dbus' and 'perl-x11-protocol' are not installed. I get the following error messages without those two packages installed. I suggest they should be added as optdepends for 'caffeine-indicator'.

INFO:root:caffeine-indicator is inhibiting desktop idleness
Can't locate Net/DBus.pm in @INC (you may need to install the Net::DBus module) (@INC contains: /usr/lib/perl5/5.36/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.36/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.36/core_perl /usr/share/perl5/core_perl) at -e line 6.
BEGIN failed--compilation aborted at -e line 6.
INFO:root:caffeine-indicator is inhibiting desktop idleness
Can't locate X11/Protocol.pm in @INC (you may need to install the X11::Protocol module) (@INC contains: /usr/lib/perl5/5.36/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.36/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.36/core_perl /usr/share/perl5/core_perl) at -e line 7.
BEGIN failed--compilation aborted at -e line 7.

micwoj92 commented on 2022-07-12 10:02 (UTC)

Disregard previous comment, I'll apply your patch later today.

Raansu commented on 2022-07-12 10:01 (UTC)

I added py_modules=[] to setup.py per the suggestions I got out of the bug report I linked to in my previous message and that solved the issue. My patch for it is here: https://gist.github.com/ShapeShifter499/88ea14699d748530c7e948e2f6c3e12f

I also let the caffeine developers know about the issue here: https://bugs.launchpad.net/caffeine/+bug/1981419

Raansu commented on 2022-07-12 09:38 (UTC) (edited on 2022-07-12 09:38 (UTC) by Raansu)

The issue seems related to this https://github.com/pypa/setuptools/issues/3197

Raansu commented on 2022-07-12 08:39 (UTC)

@micrwoj92 I'm seeing the following build error message below on two separate systems. Do you know what might be the issue?

 error: Multiple top-level packages discovered in a flat-layout: ['etc', 'share', 'translations'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.
==> ERROR: A failure occurred in build().
    Aborting...