When generating Entropy metadata out of Portage xpak information,
strip /* from SLOT (a.k.a. the sub-slots part).
At the same time, rework get_installed_package_metadata() to return
stripped SLOT information to upper layers.
Sub-slots have little meaning for Entropy packages, since rebuilds are
not its business and soname bumps are already properly detected at
dependencies calculation time. However, implementing this feature in
future might have sense, for some currently unknown reasons.
Since Entropy Client migration to file iterator-based content metadata,
such information became unavailable to Entropy SPM's add_installed_package().
In the Portage SPM plugin implementation, such method was responsible of
reconstructing the XPAK CONTENTS file if missing. Injected packages are actually
missing that file (because it does not get created through "emerge -B").
The net result is that Portage vdb metadata for Entropy injected packages was
incomplete.
This commit introduces the ability for Entropy Client to fall back to
package URLs if the repository database URL is not responding as expected
(tested at the application level).
This improves fault-tolerance greatly.
This follows the previously introduced expand_plain_package_mirror()
method. Now both methods can expand repository and package mirror URLs
read from Entropy repository configuration files adding product, arch
and branch information.
If ETP_DEBUG_WATCHDOG env variable is set, entropy.const will create
a timer thread that prints to stderr the full application thread dump.
This is quite useful in case of hard to reproduce deadlocks at the library
level.
Mixing multiprocessing with multithreading is bad and we all know that.
However, in this specific case there was nothing wrong in running tiny
functions in another process.
It seems that entropy.dump.dumpobj() is efficient enough nowadays to
have it running in the same process anyway.
This commit moves the Entropy Resources Lock from:
> /var/lib/entropy/client/database/<arch>/.using_resources
to a simpler:
> /var/lib/entropy/.using_resources
The main reason for the move is to make such path more consistent across
architectures.