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
Fabio Erculiani
9953048c6f
[entropy.client.package.action] install: apply tarball files ownership to extra download files as well
2013-12-07 20:25:56 +01:00
Fabio Erculiani
f1ef4bb5e5
[entropy.misc] FlockFile: also pass the FlockFile instance to the callback
2013-12-07 20:25:56 +01:00
Fabio Erculiani
8dd42f9663
[entropy.misc] FlockFile: move wait and acquired message callbacks to instance
2013-12-07 20:25:56 +01:00
Fabio Erculiani
2514ab2725
[entropy.misc] FlockFile: add support for wait messages in shared() and exclusive()
2013-12-07 20:25:56 +01:00
Fabio Erculiani
4d24a95667
[entropy.misc] FlockFile: add a get_path() method
2013-12-07 20:25:56 +01:00
Fabio Erculiani
76bd979816
[entropy.client.package] install: add initial concurrency support
2013-12-07 20:25:56 +01:00
Fabio Erculiani
02d35f58c3
[entropy.db.sqlite] commit() any pending transactions on release
...
This avoids potential deadlocks to occur.
2013-12-07 20:25:56 +01:00
Fabio Erculiani
e717f7a1b3
[entropy.db.sqlite] drop support for locking based on rwsem for memory repositories
...
Firstly, rwsem is semantically different from flock (but this was known) and
this may confuse the API consumer. Secondly, the locking infrastructure is
purely meant for inter-process synchronization, threads synchronization is
not a current use case.
2013-12-07 20:25:55 +01:00
Fabio Erculiani
5b6da64e35
[entropy.db.skel] document further locking infrastructure assumptions
2013-12-07 20:25:55 +01:00
Fabio Erculiani
688b8f9796
[entropy.db.sqlite] clear in-RAM cache after lock acquisition
2013-12-07 20:25:55 +01:00
Fabio Erculiani
df4b71d6a9
[entropy.db.sqlite] use lock_path() instead of self._db for file locking
2013-12-07 20:25:55 +01:00
Fabio Erculiani
5e5b006da0
[entropy.db.skel] expose lock_path() and make file lock path configurable
2013-12-07 20:25:55 +01:00
Fabio Erculiani
58815a17ed
[entropy.const] add /run/entropy directory setup, expose it through etpConst['entropyrundir']
2013-12-07 20:25:55 +01:00
Fabio Erculiani
d9f76137f0
[entropy.db.skel] improve output during lock contention phases
2013-12-07 20:25:55 +01:00
Fabio Erculiani
d5634b2b29
[entropy.db.skel] write locking output to stderr
...
This avoids breaking scriptability of --quiet options
2013-12-07 20:25:55 +01:00
Fabio Erculiani
75b1d8498b
[entropy.db.skel] fix exclusive() wrt acquired bool
2013-12-07 20:25:55 +01:00
Fabio Erculiani
489e48ba46
[entropy.db.skel] warn when repository locks are being acquired
2013-12-07 20:25:55 +01:00
Fabio Erculiani
6f37738781
[entropy.client] always prefer installed_repository() over protected attribute
2013-12-07 20:25:55 +01:00
Fabio Erculiani
366fc37f59
[entropy.db.sqlite] implement locking infrastructure
2013-12-07 20:24:23 +01:00
Fabio Erculiani
a8fd6c52c0
[entropy.db.skel] warn about flock related methods usage
2013-12-07 20:24:23 +01:00
Fabio Erculiani
3d6021042f
[entropy.db.skel] split release() into release_shared() and release_exclusive()
2013-12-07 20:24:23 +01:00
Fabio Erculiani
6206c3de48
[entropy.db.sqlite] add _is_memory() method
2013-12-07 20:24:23 +01:00
Fabio Erculiani
4903d261da
[entropy.db.skel] add base API for handling flock based synchronization
2013-12-07 20:24:22 +01:00
Fabio Erculiani
8852a15913
[entropy.misc] add shared(), release() context managers to FlockFile
2013-12-07 20:24:22 +01:00
Fabio Erculiani
f28ab4f702
Release Entropy 247
2013-12-06 17:49:22 +01:00
Fabio Erculiani
0184dac617
[entropy.db.skel] fix matching of old style virtuals
...
When only a subset of the packages in a given key, slot expose
an old style virtual dep string (like virtual/linux-binary-lts),
make sure not to pull in all of them instead.
2013-12-06 16:13:43 +01:00
Fabio Erculiani
d029f5568c
Release Entropy 246
2013-12-06 09:20:51 +01:00
Fabio Erculiani
5c717701f7
[entropy.client.package.actions] fetch: pass metadata through _check_package_path_download
...
This method is called in the setup phase, when self._meta is still None.
2013-12-06 09:18:23 +01:00
Fabio Erculiani
f85c890f9a
Release Entropy 245
2013-12-05 23:42:17 +01:00
Fabio Erculiani
a2e1e6ba94
[entropy.client] delay installed repository initialization as much as possible
2013-12-05 23:11:36 +01:00
Fabio Erculiani
addd11b191
Release Entropy 243
2013-12-05 22:25:29 +01:00
Fabio Erculiani
9c7fdd5410
[entropy.tools] update docstrings for Entropy Resources Lock methods
2013-12-05 22:12:25 +01:00
Fabio Erculiani
b21eeaf4d2
[entropy.client.methods] make Entropy Resources Lock methods classmethods
2013-12-05 22:05:35 +01:00
Fabio Erculiani
82b85704ce
[entropy.output] make TextInterface methods classmethods
...
This makes possible to fix a circular dependency in the Entropy
Resources Lock management methods
2013-12-05 21:36:30 +01:00
Fabio Erculiani
4d20097e97
Release Entropy 242
2013-12-05 16:34:16 +01:00