using /tmp as TMPDIR is a no go, since on modern systems, /tmp is on
tmpfs with a very limited amount of fs size assigned. Use /var/tmp/entropy
(or /var/tmp as fallback) instead.
calculate_updates() now returns a dictionary containing the same pieces of
information available before. In addition, it now also returns if critical
updates were found and returned by the method itself.
This is particularly useful for enforcing relaxed deps calculation in case
of critical updates (which is what happens now).
This commit breaks the Entropy Client API.
When sabayon-weekly is updated, the web service is hit by a huge amount of
requests. This commits add a bit more entropy on the execution of
_auto_repositories_update() (random between 30mins to 2 hours) and reduces
the timer frequency to 8hrs (from 4).
Rewrite the serialization code of the I/O events coming in when
the Installed Packages Repository is modified (at filesystem level)
to better deal with bursts of events.
The new code uses a "baton" Semaphore as mutex that can be passed
through threads. The MainThread event handler function tries to
acquire the Semaphore in NB mode, if it does, it spawns a thread
that executes all the operations (acquire locks in blocking mode,
calculate updates, etc) and releases the Semaphore once done.
Olympic win!
The new action_queue_items() is able to return the internal
Action Queue status without blocking while returning a consistent
state. This method will be used by Rigo to list the Action Queue
activity on the bottom notification box.
Both can be used as replacement for the ping/pong protocol in order
to let RigoDaemon shutdown.
This is particularly useful for notification applets, in where holding
RigoDaemon instance is suboptimal.
On the other hand, letting RigoDaemon reload may then cause API
mismatches with these notification applets if they don't reload
as well.
This commit adds directory monitor for the Installed Packages
Repository in order to catch, through dnofity, repository change
events and signal repositories_updated() once locks are released.
Given the current Python limitations in supporting dnotify without
getting dirt, DirectoryMonitor dispatches SIGIO to the callback
for both installed repository directory change and RigoDaemon
executable. It is up to the code determine what effectively changed.
Moreover, enabling DN_MULTISHOT causes the signal handler to be
kept alive until the dnotified file descriptors are explicitly closed
(DirectoryMonitor.close()). This is of course sub-optimal because
we get called more than needed, but still much better than polling.
Calling RigoDaemon.hello() triggers several welcome signals from
RigoDaemon itself, such as updates availability, repositories aging
and repositories unavailability. This way, Rigo is completely unloaded
with beneficial effects wrt responsiveness.