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
b26842e826
[entropy.db] direct: wrap yield around a try/finally block
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
f8d0511506
[entropy.client.package.actions] multifetch: fix pre_download_hook for edeltas
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
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
818f96fdf7
[entropy.db.sqlite] increase sqlite3 internal lock timeout to 60 seconds
2013-12-07 20:29:20 +01:00
Fabio Erculiani
a8fcfd7b15
[kswitch] add concurrency support
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
53a1b117ae
[entropy.client.package] preservedlibs: update API documentation
2013-12-07 20:29:19 +01:00
Fabio Erculiani
1c7b684aa4
[entropy.client.misc] make ConfigurationFiles process and thread safe wrt inst_repo
2013-12-07 20:29:19 +01:00
Fabio Erculiani
2393f5dda2
[entropy.client] update API documentation with information regarding repository locking
2013-12-07 20:29:19 +01:00
Fabio Erculiani
d802bb8186
[entropy.db.skel] clarify the cases where locking could be avoided
2013-12-07 20:29:18 +01:00
Fabio Erculiani
fa68f56545
[entropy.client.package.actions] install: pass remove_package_id to _install_package_unlocked
2013-12-07 20:29:18 +01:00
Fabio Erculiani
95c69168c5
[entropy.db.sqlite] make possible to acquire the repository lock file in shared mode by users
2013-12-07 20:29:18 +01:00
Fabio Erculiani
86b25739c7
[entropy.client.package.actions] remove: add concurrency support
2013-12-07 20:29:18 +01:00
Fabio Erculiani
e6e020e404
[entropy.client.package.actions] _manage: move _get_remove_trigger_data() here
2013-12-07 20:29:18 +01:00
Fabio Erculiani
8111284a4f
[entropy.client.package.actions] config: add concurrency support
2013-12-07 20:29:18 +01:00
Fabio Erculiani
12e4c4a7a3
[entropy.client.package.actions] install: rewrite lock handling
...
This is a complete rewrite of the PackageInstallAction class, due to
potentially state data collected on setup() that should be rather
collected with the lock held for the whole install transaction.
2013-12-07 20:29:18 +01:00
Fabio Erculiani
3b069f111d
[entropy.client.package.actions] install: always validate installed_package_id
2013-12-07 20:27:57 +01:00
Fabio Erculiani
3bd97b8c32
[entropy.client.package.actions] source: add concurrency support
2013-12-07 20:27:57 +01:00
Fabio Erculiani
685b7625d9
[entropy.client.package.actions] multifetch: do not show data transfer if it's 0
2013-12-07 20:27:57 +01:00
Fabio Erculiani
fca17af8c8
[entropy.client.package.actions] fetch: avoid using output() with back = True
...
This improve the output in multithreaded scenarios.
2013-12-07 20:27:57 +01:00
Fabio Erculiani
8c3798c4dc
[entropy.client.package.actions] fetch: replace "matches" with "validated"
2013-12-07 20:27:57 +01:00
Fabio Erculiani
2e92fddbf5
[entropy.client.package.actions] multifetch: add concurrency support
2013-12-07 20:27:57 +01:00
Fabio Erculiani
1ac0e38115
[entropy.fetchers] update pre_download_hook API, add post_download_hook
2013-12-07 20:27:57 +01:00
Fabio Erculiani
126caaca9e
[entropy.client.package] install: use _is_package_repository()
2013-12-07 20:27:57 +01:00
Fabio Erculiani
eab15e1cb7
[entropy.client.package] install: avoid deadlocks during conflicts removal
2013-12-07 20:27:57 +01:00
Fabio Erculiani
c54c893e55
[entropy.db] implement locking infrastructure (with the same semantics) for in-memory repositories
2013-12-07 20:27:57 +01:00
Fabio Erculiani
d7f22534b2
[entropy.db] rewrite locking infrastructure, handle multithreading use case
2013-12-07 20:27:57 +01:00
Fabio Erculiani
8c2b9c4841
[entropy.fetchers] add locking infrastructure support code
2013-12-07 20:27:57 +01:00
Fabio Erculiani
5b1d071361
[entropy.client.package.actions] fetch: update docstring
2013-12-07 20:27:57 +01:00
Fabio Erculiani
43223c03c5
[entropy.client.package.actions] fetch: avoid potential deadlocks
...
Holding shared locks on other downloadable files while holding an
exclusive lock on the file to be downloaded is looking for a disaster.
Try not to hold locks on other potentially downloadable files while
holding one already.
2013-12-07 20:27:57 +01:00
Fabio Erculiani
6efc069ddc
[entropy.client.package.actions] fetch: reduce installed_repository() lock contention
2013-12-07 20:27:57 +01:00
Fabio Erculiani
4447190b4c
[entropy.client.package.actions] action: add stat import
2013-12-07 20:27:56 +01:00
Fabio Erculiani
bd5100730e
[entropy.client.package] rename fetch phase to _fetch_phase()
2013-12-07 20:27:56 +01:00
Fabio Erculiani
9d3acd63aa
[entropy.client.package.actions] install: complete concurrency support
...
Add concurrency support to package files.
2013-12-07 20:27:56 +01:00
Fabio Erculiani
173b93ab52
[entropy.client.package.actions] action: move _stat_path() here
2013-12-07 20:27:56 +01:00
Fabio Erculiani
1b5253c6e8
[entropy.client.package.actions] fetch: remove unused method
2013-12-07 20:27:56 +01:00
Fabio Erculiani
7e7058eb46
[entropy.client.package] fetch: add initial concurrency support
2013-12-07 20:27:09 +01:00
Fabio Erculiani
85e360b196
[entropy.client.package.actions] action: fix typo in path_lock()
2013-12-07 20:25:56 +01:00
Fabio Erculiani
582bf7262a
[entropy.client.package.actions] action: expose a path_lock() method
...
This method returns a FlockFile based class object instance that
can be used for inter-process synchronization of arbitrary regular
files.
2013-12-07 20:25:56 +01:00
Fabio Erculiani
5d8055cb3c
[entropy.client.package.actions] install: drop unused metadata
2013-12-07 20:25:56 +01:00