Commit Graph

1197 Commits

Author SHA1 Message Date
Fabio Erculiani
ae8b91ac0c [entropy.*] s:occured:occurred: 2013-12-13 10:57:19 +01:00
Fabio Erculiani
fe80752612 [entropy.output] use nice unicode chars for warning and error messages 2013-12-13 07:25:10 +01:00
Fabio Erculiani
e23396625b [entropy.const] set entropy git version to 1 2013-12-13 07:24:49 +01:00
Fabio Erculiani
c60cee8082 Release Entropy 254 2013-12-12 21:24:24 +01:00
Fabio Erculiani
7bb3007704 [entropy.services.client] always append the entropy version string to requests 2013-12-12 21:16:16 +01:00
Fabio Erculiani
da31e2b49d Release Entropy 253 2013-12-12 20:11:50 +01:00
Fabio Erculiani
4d3eef0d19 [entropy.server] Server: initialize Client superclass as soon as possible 2013-12-12 20:11:19 +01:00
Fabio Erculiani
42c66c84b4 Release Entropy 252 2013-12-12 19:38:50 +01:00
Fabio Erculiani
c02da8d315 [entropy.output] make the message header variable public 2013-12-12 19:27:05 +01:00
Fabio Erculiani
e6b129ae7e [entropy.client] move ClientSystemSettingsPlugin to a separate module
This will break the circular dependency between loaders and client modules
2013-12-12 19:24:19 +01:00
Fabio Erculiani
c78b90563c [entropy.client.package] use ClientSettings() rather than SystemSettings()[id] 2013-12-12 19:23:41 +01:00
Fabio Erculiani
1eed3123c8 [entropy.client.misc] use ClientSettings() rather than SystemSettings()[id] 2013-12-12 19:23:20 +01:00
Fabio Erculiani
aa4e2441be [entropy.client] move _enabled_repos to a property, allow lazy loading 2013-12-12 18:35:17 +01:00
Fabio Erculiani
88ca752724 [entropy.client] remove repositories list cache validation code
Dead code, no longer needed.
2013-12-12 18:14:43 +01:00
Fabio Erculiani
fdceeaffbd [entropy.client] always use repositories hashes for cache keys 2013-12-12 18:10:59 +01:00
Fabio Erculiani
3574cb029f [entropy.client] do not clear cache if xcache is False
Nowadays, cache in entropy.client uses hashes of repositories
as part of the key, there is no need to clear cache explicitly
2013-12-12 17:26:14 +01:00
Fabio Erculiani
67cccf3e8a [entropy.client] lazy load ClientSystemSettingsPlugin 2013-12-12 17:13:19 +01:00
Fabio Erculiani
8a7afe97e8 [entropy.client] use ClientSettings() whenever needed
This commit also drops the sys_settings_client_plugin_id attribute
2013-12-12 16:49:01 +01:00
Fabio Erculiani
56f0ed4fd5 [entropy.client] Client: move object attributes to @property to enable lazy loading 2013-12-12 15:05:02 +01:00
Fabio Erculiani
3a7269aa5c [entropy.db] EntropyBaseRepository: turn lock methods into no-op if direct mode
Now that the repository lock is reentrant, it's good to have the
methods take into account direct mode as well. In direct mode,
we explicitly don't want to deal with any kind of locking, because
we accept to manipulate stale data. In order to hide locking code
from the outside and have it transparently managed inside entropy.*
methods, we must respect requests made in direct mode.
2013-12-12 14:25:44 +01:00
Fabio Erculiani
412759e20f Release Entropy 251 2013-12-12 12:38:28 +01:00
Fabio Erculiani
db8bd0fb40 [entropy.client.package] multifetch: ensure that path exists before calling _match_checksum 2013-12-12 12:36:45 +01:00
Fabio Erculiani
4b8b3b1af7 [entropy.client.package] multifetch: use the same path for both calls 2013-12-12 12:36:03 +01:00
Fabio Erculiani
864e3ecf21 [entropy.client.package] multifetch: fix exit status in case of download failures 2013-12-12 12:30:25 +01:00
Fabio Erculiani
36b634aea7 [entropy.output] _print_prio: use nice unicode header chars :-) 2013-12-12 11:56:04 +01:00
Fabio Erculiani
e21d564669 Release Entropy 250 2013-12-12 10:50:15 +01:00
Fabio Erculiani
d04f67c96f [entropy.db.sqlite] fix typo in argument name 2013-12-12 10:41:21 +01:00
Fabio Erculiani
023e8e1b72 [entropy.db] EntropyBaseRepository: make possible to permanently enable direct mode 2013-12-12 10:21:27 +01:00
Fabio Erculiani
af2ce34d57 Release Entropy 249 2013-12-11 22:44:44 +01:00
Fabio Erculiani
856184b530 [entropy.client.db] do not hide the exception traceback 2013-12-11 22:43:02 +01:00
Fabio Erculiani
0243ed70b1 [entropy.db.sql] rewrite type checking in insertDependencies()
metadata could be of list type (and not just tuple) in case of
data coming from websrv.
2013-12-11 22:42:14 +01:00
Fabio Erculiani
eada088f56 [entropy.client.db] do not catch KeyError for update() but just during object init 2013-12-11 22:19:40 +01:00
Fabio Erculiani
43f4bd5ee3 Release Entropy 248 2013-12-11 16:39:02 +01:00
Fabio Erculiani
68fe99d33e [entropy.db.sqlite] acquire an exclusive lock if schema updates are needed
_maybeDatabaseSchemaUpdates is only called inside the costructor,
at that time, it's not possible to acquire the lock elsewhere
because the object doesn't exist yet.
2013-12-11 07:49:04 +01:00
Fabio Erculiani
061b02bebc [entropy.db.sqlite] move indexing setup back to object constructor
This has nothing to do with schema update
2013-12-11 07:43:50 +01:00
Fabio Erculiani
de88d6cc73 [entropy.client.repository] wrap Repository.sync() around a ResourceLock 2013-12-10 22:22:41 +01:00
Fabio Erculiani
82d6d37bcf [entropy.db.sqlite] move schema update code away from __init__ 2013-12-10 21:58:19 +01:00
Fabio Erculiani
7808ad6b92 [entropy.db.sqlite] migrate locking code to entropy.locks.ResourceLock
The new EntropySQLiteRepository uses ResourceLock, and gains support
for reentrancy, anti-deadlock safety measures (only for nested calls),
unification of memory and file repositories locking code (the semantics
was already the same).
2013-12-10 21:42:34 +01:00
Fabio Erculiani
401b9cbeb3 [entropy.client.loaders] Security: pass args and kwargs down to the object constructor 2013-12-10 16:42:34 +01:00
Fabio Erculiani
498674828d [entropy.tools] get_hash_from_md5_file: do not hide IOError exceptions 2013-12-10 16:39:55 +01:00
Fabio Erculiani
fc597d04c5 [entropy.security] refactor System, add internal locking support, improve speed 2013-12-10 16:39:17 +01:00
Fabio Erculiani
b99def9128 [entropy.locks] add exclusive() and shared() context managers 2013-12-10 11:22:42 +01:00
Fabio Erculiani
47e9b6ee0e [entropy.locks] rename _GenericResourceLock to ResourceLock 2013-12-10 05:39:59 +01:00
Fabio Erculiani
94ab49fd0b [tests] use const_mk{s,d}temp instead of tmpfile ones, default TMPDIR to /var/tmp 2013-12-09 14:36:34 +01:00
Fabio Erculiani
6a2d45df47 [entropy.locks] set recursed to False only when the reference counter is 0 2013-12-09 14:24:37 +01:00
Fabio Erculiani
d080db0d3b [tests] locks: fix test class name 2013-12-09 14:21:05 +01:00
Fabio Erculiani
bf3a8b79f9 [entropy.locks] use TLS for reentrancy safety checks, update tests 2013-12-09 14:19:21 +01:00
Fabio Erculiani
7e30b65744 [entropy.locks] _file_lock_create: beautify, open O_CREAT | O_RDONLY if shared mode 2013-12-08 16:33:29 +01:00
Fabio Erculiani
ebf63e6060 [entropy.locks] fix shared/exclusive locking mix due to reentrancy, add tests 2013-12-08 16:15:39 +01:00
Fabio Erculiani
97f18338ba [entropy.locks] move acquire_lock(), release_lock() from entropy.tools 2013-12-08 14:54:42 +01:00