On a fresh install, with no downloaded repositories, users were forced
to restart Rigo in order to have the search function fully functional.
If a local repository is configured but not downloaded (thus, not
available) the same bug happens.
It turned out to be Entropy._enabled_repos, returned by Entropy.repositories()
which didn't get re-initialized after a repository update. This commit adds
a _validate_repositories() call inside _repositories_updated_signal().
Application.get_markup() and Application.get_extended_markup() must
always return bytestring (decoded) data to make Gtk3 libs and code
happy. It happened that _("N/A") was returned without passing through
prepare_markup() or escape_markup(). This commit fixes it.
If app_name is unicode decoded, the following code will fail (in pl_PL):
>>> prepare_markup(_("<b>%s</b>, internal error")) % (_("Application"),)
with a nice UnicodeDecodeError due to implicit bytestring decode.
prepare_markup() output is bytestring, _() output is unicode.
Thanks to Enlik for reporting.
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.
The new WebService get_documents() is more efficient in terms of
server resources consumption since it doesn't force the WS engine
to calculate the full result set length, which had little use anyway
in Rigo.
This commit switches entropy.client.services' DocumentList to and
reverse dependencies to use the new WS API. The older WS API will be
kept alive for a while (6 months, roughly).
It has been observed that subprocess.call() called by open_url()
might fail due to Error 9 (Bad File Descriptor) due to a race
between the garbage collector thread (run in the MainThread) and
our own subprocess.call() thread. For this reason, make sure to
call open_url() outside the try/finally block. This seems to be
enough.
Previously, the Notice object was shown directly inside the
cell renderer, which made things a bit clumsy and buggy.
Now, notices are loaded through xdg-open in html format.