This commit should hopefully fix any deadlock reported in
Entropy Server due to weird sqlite3 behaviours when multiple
idle connections are open on the same file
This commit ensures that __connlock is held during the whole
__cursor_cache and __connection_cache initialization. This avoids
any possible race condition, especially on dbapi2.connect() which
could cause weird random anomalies
Using the new baseinfo/extrainfo SCHEMA, several deadlocks were
found when using Eit (thus Entropy Server), due to aggressive
sqlite3 object caching.
This commit removes almost every implicit commit() call from the
EntropyRepository code, forcing the caller to properly handle
transactions. This will hopefully fix any deadlock problem observed
inside our chroots.
It has been found that with the new baseinfo, extrainfo SCHEMA,
createAllIndexes() deadlocks at the ANALYZE statement. Committing
any previous transaction before calling ANALYZE fixes the issue.
It has been found that pkg vdb entry mtime was not properly updated,
which resulted in the following Portage cache corruption:
>>> Auto-cleaning packages...
portage: COUNTER for net-libs/gnutls-2.12.18 was corrupted; resetting to value of 0
Packages not providing any file don't get the image/ directory created
by uncompress_tarball, resulting in Portage pkg_preinst code to complain
about that, with something like:
$ find: `/var/tmp/entropy/.../c++-tr1-functional-0/image/': No such file or directory
Generate config_file_map dinamically by considering config file paths
as potential directories and if available, by adding the collected
subpaths to it
When an available conflict replacement is found, it is better to
enforce its installation before the actual conflicting pkg, in order
to avoid to have the conflict removed for some time during the
transaction phase. Moreover, if the transaction is interrupted
after the conflict removal but before the new pkg install, this
pkg won't be upgraded anymore, because it would become not installed.
Scenario:
net-tools conflicts with old sys-apps/openrc. sys-apps/openrc gets
removed during net-tools install phase. sys-apps/openrc is scheduled
for install a lot later. This also introduced a glitch with base-gcc,
triggering gcc-config, which complained about missing /etc/init.d/functions.sh
Virtual are not directly owning sonames reverse dependencies need.
For this reason, when a virtual package is encountered, its direct
dependencies must be taken into consideration in the soname bump
routine.
Moreover, pkgs requiring newer (or older?) sonames, must be bound
to soname providers on the graph, as direct dependency. Not doing
so would lead pkg_* phases to fail.
Scenario:
dev-libs/glib wants newer libffi.so.x, but the pkg depends against
virtual/libffi. If virtual/libffi dependencies are not taken into
consideration, _lookup_library_breakages() would fail to detect
the need of a bump.