From: "Alex Holst" Subject: Re: sysutils/glances: OSError on amd64 To: "Jeremie Courreges-Anglas" Cc: ports@openbsd.org Date: Sun, 27 Oct 2024 20:48:17 +0100 On Sun, 27 Oct 2024, at 13:45, Jeremie Courreges-Anglas wrote: > I suspect you're not using a swap partition on your system. Spot on, but I must be doing something else wrong, too. I applied your patch to py-psutil, reinstalled it and even tried bumping the revision on glances to ensure I picked up the new build: [..] ===> Patching for py3-psutil-6.0.0p0 ===> Applying OpenBSD patch patch-psutil_arch_openbsd_mem_c Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: patches/patch-psutil_arch_openbsd_mem_c |=================================================================== |RCS file: patches/patch-psutil_arch_openbsd_mem_c |diff -N patches/patch-psutil_arch_openbsd_mem_c |--- /dev/null 1 Jan 1970 00:00:00 -0000 |+++ patches/patch-psutil_arch_openbsd_mem_c 27 Oct 2024 12:38:10 -0000 -------------------------- (Creating file patches/patch-psutil_arch_openbsd_mem_c...) Patching file patches/patch-psutil_arch_openbsd_mem_c using Plan A... Empty context always matches. Hunk #1 succeeded at 1. done [..] $ pkg_info -v glances | grep '@depend' @depend devel/py-future,python3:py3-future-*:py3-future-1.0.0 @depend lang/python/3,-main:python->=3.11,<3.12:python-3.11.10p1 @depend sysutils/py-psutil,python3:py3-psutil-*:py3-psutil-6.0.0p0 @depend textproc/py-defusedxml,python3:py3-defusedxml-*:py3-defusedxml-0.7.1p4 @depend www/py-bottle,python3:py3-bottle-*:py3-bottle-0.12.23p1 Normal glances invocation and this minimal test case still fails: $ python3.11 Python 3.11.10 (main, Oct 14 2024, 18:07:48) [Clang 16.0.6 ] on openbsd7 Type "help", "copyright", "credits" or "license" for more information. >>> import psutil >>> psutil.swap_memory() Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.11/site-packages/psutil/__init__.py", line 2027, in swap_memory return _psplatform.swap_memory() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/psutil/_psbsd.py", line 231, in swap_memory total, used, free, sin, sout = cext.swap_mem() ^^^^^^^^^^^^^^^ OSError: [Errno 0] Error $ pkg_info py3-psutil Information for inst:py3-psutil-6.0.0p0 [..]