As we discussed in the last meeting, we reset the ports tree and began from scratch, even though this change involves porting all the packages. Starting small and growing gradually, this approach will reduce build times and consequently lower energy consumption in a world affected by climate change. We will add new ports as users needs arise; ok h3artbl33d@
This commit is contained in:
parent
83a0aaf92c
commit
9a3af55370
59377 changed files with 98673 additions and 4712155 deletions
|
@ -18,7 +18,7 @@ Index: psutil/_psbsd.py
|
|||
from ._common import AccessDenied
|
||||
from ._common import NoSuchProcess
|
||||
from ._common import ZombieProcess
|
||||
@@ -51,7 +52,7 @@ if FREEBSD:
|
||||
@@ -52,7 +53,7 @@ if FREEBSD:
|
||||
cext.SWAIT: _common.STATUS_WAITING,
|
||||
cext.SLOCK: _common.STATUS_LOCKED,
|
||||
}
|
||||
|
@ -27,16 +27,16 @@ Index: psutil/_psbsd.py
|
|||
PROC_STATUSES = {
|
||||
cext.SIDL: _common.STATUS_IDLE,
|
||||
cext.SSLEEP: _common.STATUS_SLEEPING,
|
||||
@@ -250,7 +251,7 @@ def cpu_count_logical():
|
||||
@@ -281,7 +282,7 @@ def cpu_count_logical():
|
||||
return cext.cpu_count_logical()
|
||||
|
||||
|
||||
-if OPENBSD or NETBSD:
|
||||
+if OPENBSD or NETBSD or SECBSD:
|
||||
+if OPENBSD or SECBSD or NETBSD:
|
||||
|
||||
def cpu_count_cores():
|
||||
# OpenBSD and NetBSD do not implement this.
|
||||
return 1 if cpu_count_logical() == 1 else None
|
||||
@@ -304,7 +305,7 @@ def cpu_stats():
|
||||
@@ -339,7 +340,7 @@ def cpu_stats():
|
||||
for line in f:
|
||||
if line.startswith(b'intr'):
|
||||
intrs = int(line.split()[1])
|
||||
|
@ -44,26 +44,26 @@ Index: psutil/_psbsd.py
|
|||
+ elif OPENBSD or SECBSD:
|
||||
# Note: the C ext is returning some metrics we are not exposing:
|
||||
# traps, faults and forks.
|
||||
ctxsw, intrs, soft_intrs, syscalls, traps, faults, forks = \
|
||||
@@ -336,7 +337,7 @@ if FREEBSD:
|
||||
max_freq = None
|
||||
ctxsw, intrs, soft_intrs, syscalls, traps, faults, forks = (
|
||||
@@ -374,7 +375,7 @@ if FREEBSD:
|
||||
ret.append(_common.scpufreq(current, min_freq, max_freq))
|
||||
return ret
|
||||
|
||||
-elif OPENBSD:
|
||||
+elif OPENBSD or SECBSD:
|
||||
|
||||
def cpu_freq():
|
||||
curr = float(cext.cpu_freq())
|
||||
return [_common.scpufreq(curr, 0.0, 0.0)]
|
||||
@@ -401,7 +402,7 @@ def net_if_stats():
|
||||
@@ -450,7 +451,7 @@ def net_connections(kind):
|
||||
families, types = conn_tmap[kind]
|
||||
ret = set()
|
||||
|
||||
def net_connections(kind):
|
||||
"""System-wide network connections."""
|
||||
- if OPENBSD:
|
||||
+ if OPENBSD or SECBSD:
|
||||
ret = []
|
||||
for pid in pids():
|
||||
try:
|
||||
@@ -492,7 +493,7 @@ def users():
|
||||
rawlist = cext.net_connections(-1, families, types)
|
||||
elif NETBSD:
|
||||
rawlist = cext.net_connections(-1, kind)
|
||||
@@ -525,7 +526,7 @@ def users():
|
||||
for item in rawlist:
|
||||
user, tty, hostname, tstamp, pid = item
|
||||
if pid == -1:
|
||||
|
@ -72,7 +72,7 @@ Index: psutil/_psbsd.py
|
|||
pid = None
|
||||
if tty == '~':
|
||||
continue # reboot or shutdown
|
||||
@@ -521,14 +522,14 @@ def _pid_0_exists():
|
||||
@@ -554,14 +555,14 @@ def _pid_0_exists():
|
||||
def pids():
|
||||
"""Returns a list of PIDs currently running on the system."""
|
||||
ret = cext.pids()
|
||||
|
@ -85,11 +85,11 @@ Index: psutil/_psbsd.py
|
|||
|
||||
|
||||
-if OPENBSD or NETBSD:
|
||||
+if OPENBSD or NETBSD or SECBSD:
|
||||
+if OPENBSD or SECBSD or NETBSD:
|
||||
|
||||
def pid_exists(pid):
|
||||
"""Return True if pid exists."""
|
||||
exists = _psposix.pid_exists(pid)
|
||||
@@ -653,7 +654,7 @@ class Process(object):
|
||||
@@ -690,7 +691,7 @@ class Process:
|
||||
|
||||
@wrap_exceptions
|
||||
def cmdline(self):
|
||||
|
@ -97,31 +97,31 @@ Index: psutil/_psbsd.py
|
|||
+ if SECBSD and self.pid == 0:
|
||||
return [] # ...else it crashes
|
||||
elif NETBSD:
|
||||
# XXX - most of the times the underlying sysctl() call on Net
|
||||
@@ -764,7 +765,7 @@ class Process(object):
|
||||
# XXX - most of the times the underlying sysctl() call on
|
||||
@@ -808,7 +809,7 @@ class Process:
|
||||
for thread_id, utime, stime in rawlist:
|
||||
ntuple = _common.pthread(thread_id, utime, stime)
|
||||
retlist.append(ntuple)
|
||||
- if OPENBSD:
|
||||
+ if OPENBSD or SECBSD:
|
||||
+ if SECBSD:
|
||||
self._assert_alive()
|
||||
return retlist
|
||||
|
||||
@@ -797,7 +798,7 @@ class Process(object):
|
||||
TCP_STATUSES)
|
||||
ret.append(nt)
|
||||
@@ -824,7 +825,7 @@ class Process:
|
||||
|
||||
- if OPENBSD:
|
||||
+ if OPENBSD or SECBSD:
|
||||
self._assert_alive()
|
||||
|
||||
return ret
|
||||
@@ -834,7 +835,7 @@ class Process(object):
|
||||
if NETBSD:
|
||||
rawlist = cext.net_connections(self.pid, kind)
|
||||
- elif OPENBSD:
|
||||
+ elif SECBSD:
|
||||
rawlist = cext.net_connections(self.pid, families, types)
|
||||
else:
|
||||
rawlist = cext.proc_connections(self.pid, families, types)
|
||||
@@ -875,7 +876,7 @@ class Process:
|
||||
"""Return process current working directory."""
|
||||
# sometimes we get an empty string, in which case we turn
|
||||
# it into None
|
||||
- if OPENBSD and self.pid == 0:
|
||||
+ if SECBSD and self.pid == 0:
|
||||
return None # ...else it would raise EINVAL
|
||||
return "" # ...else it would raise EINVAL
|
||||
elif NETBSD or HAS_PROC_OPEN_FILES:
|
||||
# FreeBSD < 8 does not support functions based on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue