Commit Graph

10915 Commits

Author SHA1 Message Date
Fabio Erculiani
358c6cc80c [entropy.client.repository] drop unlocked_sync(), locking happens externally nowadays 2013-12-08 14:42:23 +01:00
Fabio Erculiani
1917771b54 [entropy.locks] move Entropy Resources Lock code to a separate module 2013-12-08 14:37:57 +01:00
Fabio Erculiani
99bb796952 [Rigo] initialize the CSS provider as soon as possible, fixes a glitch with GTK 3.10 2013-12-08 07:37:20 +01:00
Fabio Erculiani
b1ed42d80a [entropy.db.skel] drop __atomMatchValidateCache
SHA1 is used nowadays and all the caching bugs should be fixed
rather than being hidden.
2013-12-08 06:28:08 +01:00
Fabio Erculiani
c0776b07bd [RigoDaemon] import the threading module directly 2013-12-08 06:17:15 +01:00
Fabio Erculiani
0f32ae2696 [RigoDaemon] use systemd-logind shutdown/idle Inhibit() API
Inhibit shutdown or idling (see systemd documentation) during
application management or repository update phases.
2013-12-08 06:13:38 +01:00
Fabio Erculiani
d8ee468768 [RigoDaemon] add execute_mainloop() wrapper method 2013-12-08 06:13:11 +01:00
Fabio Erculiani
e213a5e775 [RigoDaemon] fix regression in api(), the keyword argument must be "sender" 2013-12-07 20:30:07 +01:00
Fabio Erculiani
4e597b8769 [RigoDaemon] use a shared lock with clean_package_cache 2013-12-07 20:30:07 +01:00
Fabio Erculiani
1688ce53ac [entropy.client] clean_downloaded_packages, add skip_available_packages keyword arg
skip_available_packages can be used to filter out the removal of
package tarballs still belonging to available packages. This makes
possible to just use a shared Entropy Resources lock.
2013-12-07 20:30:07 +01:00
Fabio Erculiani
16025afc75 [entropy.client.package] move "QA:" to translatable strings 2013-12-07 20:30:07 +01:00
Fabio Erculiani
e75b95a1b3 [entropy.client.package] workout_subdir: do not rmtree if symlink expected but directory found 2013-12-07 20:30:06 +01:00
Fabio Erculiani
e6cca25473 [entropy.client.package] fail (rather than rmtree) when a file is expected but directory is found 2013-12-07 20:30:06 +01:00
Fabio Erculiani
0d486bc470 [entropy.client.package] if a directory is a file, do not unlink() but rename() 2013-12-07 20:30:06 +01:00
Fabio Erculiani
a0d4711cdc [entropy.client.package.actions] remove: commit after insertSpmUid() 2013-12-07 20:30:06 +01:00
Fabio Erculiani
6d4f9e3089 [entropy.client.package.actions] install: commit after insertSpmUid() 2013-12-07 20:30:06 +01:00
Fabio Erculiani
529203ce5a [RigoDaemon] maybe_enqueue_kernel_actions: use simulate 2013-12-07 20:30:06 +01:00
Fabio Erculiani
4f9d8ef61d [RigoDaemon] fixup pylint warnings 2013-12-07 20:30:06 +01:00
Fabio Erculiani
b26842e826 [entropy.db] direct: wrap yield around a try/finally block 2013-12-07 20:30:06 +01:00
Fabio Erculiani
c356d615f3 [Rigo] use direct access to the installed packages repository, avoid locking
Locking is too expensive, and using memory cached data may result
in huge inconsistencies due to stale data. Direct mode allows to
skip memory cache and read data directly from the database storage.
However, entropy.db.sqlite queries using memory caches did not
perform very well when cache is cold. But this has been solved by
directed() already (a different query is run if memory cache is disabled).
2013-12-07 20:30:06 +01:00
Fabio Erculiani
3545f2b619 [entropy.db] add direct access support to repository
In latency sensitive code paths, the performance penality caused
by file lock contention and memory cache invalidation is too high.
This problem happens in Rigo, which is extremely latency sensitive.
Since we don't want to crap on the user, a way to solve this is
letting API consumers skip the memory cache and read data directly
from the database store. The trade off is that data may be stale,
incomplete, or invalid, but as long as the consumer is aware of this,
that's fine.
2013-12-07 20:30:06 +01:00
Fabio Erculiani
1739953f8d [Rigo] add installed pkgs repository wherever it makes sense
In latency sensitive code paths, it's much better to deal with
stale and invalid data rather than causing long delays.
2013-12-07 20:30:06 +01:00
Fabio Erculiani
94e07648ec [RigoDaemon] add concurrency support \o/ 2013-12-07 20:30:06 +01:00
Fabio Erculiani
f8d0511506 [entropy.client.package.actions] multifetch: fix pre_download_hook for edeltas 2013-12-07 20:30:06 +01:00
Fabio Erculiani
d88e33c40c [RigoDaemon] use context manager with ReadersWritersSemaphore 2013-12-07 20:30:06 +01:00
Fabio Erculiani
65f5dce076 [entropy.client.package] add sys import 2013-12-07 20:30:06 +01:00
Fabio Erculiani
a8c98a5081 [entropy.client.package.actions] action: cope with unavailability of file locking
Some filesystems, especially old network file systems, don't support
file locking. Try not to explode if this is the case but rather nag
the user with scary error messages.
2013-12-07 20:30:06 +01:00
Fabio Erculiani
76df355ca4 [solo.commands.pkg] add concurrency support 2013-12-07 20:30:06 +01:00
Fabio Erculiani
53b5d9cddc [solo.commands.unused] add concurrency support 2013-12-07 20:30:06 +01:00
Fabio Erculiani
e0142412d8 [solo.commands.mask] acquire the Entropy Resources Lock in shared mode 2013-12-07 20:30:06 +01:00
Fabio Erculiani
25d88d95b6 [solo.commands.conf] acquire the Entropy Resources Lock in shared mode 2013-12-07 20:30:06 +01:00
Fabio Erculiani
9298c740fe [solo.commands.ugc] acquire the Entropy Resources Lock in shared mode 2013-12-07 20:30:06 +01:00
Fabio Erculiani
ecb0914084 [Rigo] add "in:exact" command to allow users to match packages, use it for lts kernels 2013-12-07 20:30:06 +01:00
Fabio Erculiani
b7eeb5ce8a [Rigo] use context manager with Entropy.rwsem() 2013-12-07 20:30:06 +01:00
Fabio Erculiani
7378906396 [entropy.misc] ReadersWritersSemaphore: add reader() and writer() context managers 2013-12-07 20:29:20 +01:00
Fabio Erculiani
68f5fd0320 [entropy.client] Trigger: lazily load the Source Package Manager instance object 2013-12-07 20:29:20 +01:00
Fabio Erculiani
6af6a2115e [entropy.client] move Trigger class under package.actions, make it "private" 2013-12-07 20:29:20 +01:00
Fabio Erculiani
c8a0377845 [solo.commands.cache] add concurrency support 2013-12-07 20:29:20 +01:00
Fabio Erculiani
818f96fdf7 [entropy.db.sqlite] increase sqlite3 internal lock timeout to 60 seconds 2013-12-07 20:29:20 +01:00
Fabio Erculiani
8c73f9b24c [matter] lazily load the Entropy Server instance object 2013-12-07 20:29:19 +01:00
Fabio Erculiani
b886d7e3fc [matter] use Server class with acquire_entropy_locks 2013-12-07 20:29:19 +01:00
Fabio Erculiani
0725612508 [kernel-switcher] use Client class with acquire_entropy_locks 2013-12-07 20:29:19 +01:00
Fabio Erculiani
6e81d188c3 [kernel-switcher] add concurrency support 2013-12-07 20:29:19 +01:00
Fabio Erculiani
a8fcfd7b15 [kswitch] add concurrency support 2013-12-07 20:29:19 +01:00
Fabio Erculiani
e7555f4127 [solo.commands.manage] allow concurrency, use the Entropy Resources Lock in shared mode 2013-12-07 20:29:19 +01:00
Fabio Erculiani
9c38af6a34 [entropy.security] document installed repository lock usage requirements
entropy.Security will undergo a complete overhaul in the next months.
2013-12-07 20:29:19 +01:00
Fabio Erculiani
19439db61c [solo.commands.security] add concurrency support 2013-12-07 20:29:19 +01:00
Fabio Erculiani
13af91c7ba [solo.commands.libtest] add concurrency support 2013-12-07 20:29:19 +01:00
Fabio Erculiani
e317a71524 [solo.commands.deptest] add concurrency support 2013-12-07 20:29:19 +01:00
Fabio Erculiani
f4a25af5d0 [solo.commands.upgrade] add concurrency support 2013-12-07 20:29:19 +01:00