portage-jobsmon is a Python script to track currently running emerges and display their logs on a split-screen basis. Due to use of inotify, it can update them quickly while keeping CPU usage low.
Created attachment 220779 [details]
The ebuild as suggested to Sunrise
The ebuild has been commited to Sunrise overlay. After review, it'll be available at:
thanks for your script Michał, bit very often I get a "IndexError: list index out of range" when monitoring for example emerge -uavDN -j3 world.
I simply let portage-jobsmon run for some minutes, and then it crashes with the following:
Traceback (most recent call last):
File "/usr/bin/portage-jobsmon", line 544, in <module>
File "/usr/bin/portage-jobsmon", line 539, in main
curses.wrapper(cursesmain, opts, args)
File "/usr/lib64/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/bin/portage-jobsmon", line 498, in cursesmain
n.loop(callback = timeriter)
File "/usr/lib64/python2.7/site-packages/pyinotify.py", line 1437, in loop
if (callback is not None) and (callback(self) is True):
File "/usr/bin/portage-jobsmon", line 487, in timeriter
File "/usr/bin/portage-jobsmon", line 430, in find_locks
w = window_add(dir)
File "/usr/bin/portage-jobsmon", line 410, in window_add
w.watchd = list(wm.add_watch(fn, pyinotify.IN_MODIFY).values())
IndexError: list index out of range
Do you have any idea what causes this one?
The script is currently unmaintained and won't work fine with current Portage and its IPC reopening and closing the files faster than inotify could handle it.
I intend to rewrite it at some point. It needs a lot of love to work neatly nowadays, and support all the various cases which can occur.
In the meantime, I think we ought to mask this package for removal from sunrise.