Commit Graph

1310 Commits

Author SHA1 Message Date
Fabio Erculiani
92146a8c17 [entropy.tools] apply_entropy_delta: avoid potential fd leaks 2014-02-13 16:12:35 +01:00
Fabio Erculiani
4a9980d37c [entropy.qa] rename ErrorReportInterface to ErrorReport, it's cleaner 2014-01-30 14:56:37 +01:00
Fabio Erculiani
715e628c84 [entropy.client] drop CacheMixin class 2014-01-30 14:56:37 +01:00
Fabio Erculiani
b4196026d8 [entropy.client] drop _get_available_packages_hash() 2014-01-30 14:56:37 +01:00
Fabio Erculiani
d0cf15ffc6 [entropy.client] add missing imports 2014-01-30 14:56:37 +01:00
Fabio Erculiani
cc3d69c8b2 [entropy.client] rename _repositories_hash() to repositories_checksum() 2014-01-30 14:56:37 +01:00
Fabio Erculiani
2b6a4e8d9a [entropy.client.cache] improve _repositories_hash() robustness against collisions 2014-01-30 14:56:37 +01:00
Fabio Erculiani
f6591e1ade [entropy.client.cache] drop _selective_repositories_hash() 2014-01-30 14:56:37 +01:00
Fabio Erculiani
f5eb6c1803 [entropy.client.cache] drop _all_repositories_hash, duplicate of _repositories_hash() 2014-01-30 14:56:37 +01:00
Fabio Erculiani
3c3a376a3b [entropy.client] rename _filter_available_repositories() to filter_repositories() 2014-01-30 14:56:37 +01:00
Fabio Erculiani
a83935d33c [entropy.client.client] move clear_cache() to Client 2014-01-30 14:56:37 +01:00
Fabio Erculiani
34a03796cb Release Entropy 269 2014-01-28 14:39:33 +01:00
Fabio Erculiani
1841234eb4 Release Entropy 268 2014-01-28 14:17:45 +01:00
Fabio Erculiani
4988c54502 Release Entropy 267 2014-01-28 11:18:50 +01:00
Fabio Erculiani
49b210e6b0 Release Entropy 266 2014-01-24 14:04:11 +01:00
Fabio Erculiani
96b3b7115a [entropy.locks] call const_setup_directory only, it's enough
Also deal with possible directory creation errors. We can safely
ignore them, since we would fail right after anyway.
This will allow the code to deal with the case where the directory
exists but we don't have enough perms to mkdir it.
2014-01-16 07:22:26 +01:00
Fabio Erculiani
5423663751 [entropy.const] fix default makedirs permissions, const_setup_file does it anyway 2014-01-16 07:21:57 +01:00
Fabio Erculiani
0b881e238f Release Entropy 265 2014-01-14 09:10:34 +01:00
Fabio Erculiani
e76775701e [entropy.client.package] multifetch: define failed_downloads before use 2014-01-05 15:51:29 +01:00
Fabio Erculiani
64b0e8baa9 [entropy.client] Client: rewrite lazy loading support, improve reliability 2014-01-05 14:53:05 +01:00
Fabio Erculiani
301aa281d5 [entropy.client] avoid races in Entropy Client @property methods 2014-01-05 13:59:14 +01:00
Fabio Erculiani
881f8831cf [entropy.client] set _real_enabled_repos atomically
The race was triggered by the startup code path in Rigo.
2014-01-05 13:55:31 +01:00
Fabio Erculiani
8c4737ef7a [entropy.core] SystemSettingsPlugin: make parse() return plugin metadata
This is needed in order to avoid infinite recursion through
__maybe_lazy_load()
2014-01-05 13:32:36 +01:00
Fabio Erculiani
64fb91dcae [entropy.core] SystemSettings: enable lazy loading of external plugins as well 2014-01-05 13:00:31 +01:00
Fabio Erculiani
92a5f2fcc1 Release Entropy 264 2014-01-04 11:16:46 +01:00
Fabio Erculiani
3ebba8b14f [entropy.db.sql] fix typo in SQL query, s/tag/versiontag/ 2014-01-04 11:15:27 +01:00
Fabio Erculiani
c48869bb31 [entropy.core] SystemSettings: drop mtime based in-RAM cache
It does more harm than good and we have lazy loading now
2014-01-04 11:01:27 +01:00
Fabio Erculiani
c98c39db06 [entropy.core] SystemSettings: drop mtime based cache validation
This is no longer necessary and error prone on filesystems with
coarse mtime granularity (like ext3). Individual methods are able
to validate their own caches.
2014-01-04 10:31:09 +01:00
Fabio Erculiani
5da276bfb6 [entropy.core] SystemSettings: __remove_repo_cache() is no longer necessary 2014-01-04 10:10:49 +01:00
Fabio Erculiani
9af5689a13 [entropy.core] SystemSettings: simplify __getitem__ 2014-01-03 20:57:10 +01:00
Fabio Erculiani
ab6d1f9fc4 [entropy.core] SystemSettings: lazy load item only if it hasn't been loaded yet 2014-01-03 20:55:36 +01:00
Fabio Erculiani
2053989b27 [entropy.core] SystemSettings: add lazy loading of metadata 2014-01-03 20:25:52 +01:00
Fabio Erculiani
7877126107 Release Entropy 263 2014-01-03 16:12:21 +01:00
Fabio Erculiani
b0bd765b50 [entropy.db.sqlite] do not acquire the repo lock if it's not strictly needed
Try to avoid to acquire the repository lock in exclusive mode if
it's not strictly needed. We were acquiring the lock in exclusive mode
even when there was nothing to update due to schema changes.
2014-01-03 16:10:33 +01:00
Fabio Erculiani
f1de6accef Release Entropy 262 2014-01-03 15:50:06 +01:00
Fabio Erculiani
74f8bb63f5 [entropy.spm] PortagePlugin: update portage.doebuild() call, remove deprecated root argument 2014-01-03 15:45:39 +01:00
Fabio Erculiani
d03466ea10 [entropy.db.cache] disable in-RAM cache if total memory is less than 4G 2014-01-03 14:54:04 +01:00
Fabio Erculiani
ee48b812ed [entropy.tools] add total_memory() function 2014-01-03 14:53:42 +01:00
Fabio Erculiani
338b3f6cc5 [entropy.db] expose and use the currently set cache policy 2014-01-02 23:00:00 +01:00
Fabio Erculiani
b6ed5f9948 [entropy.db.cache] introduce EntropyRepositoryCachePolicies
It is now possible to define a policy for the in-RAM cache through
EntropyRepository constructor or EntropyRepositoryCachePolicies.
2014-01-02 22:58:54 +01:00
Fabio Erculiani
2d22414086 Release Entropy 261 2014-01-01 11:03:52 +01:00
Fabio Erculiani
e16ad0a828 [entropy.db.sqlite] catch LockAcquireError in _maybeDatabaseSchemaUpdates
User may not have the privileges to acquire the lock, but we should
not fail here.
2014-01-01 10:58:54 +01:00
Fabio Erculiani
999f0509dd [entropy.db] raise LockAcquireError in case of lock acquire error failures 2014-01-01 10:58:17 +01:00
Fabio Erculiani
f0d437a090 Release Entropy 260 2013-12-31 18:01:25 +01:00
Fabio Erculiani
2f713f73d5 [entropy.db.sqlite] raise timeout to 300 seconds
This will better fit slow disks.
2013-12-31 18:00:35 +01:00
Fabio Erculiani
1598f5e501 [entropy.*] use get_repository() to return a GenericRepository as well
All the repository classes must go through get_repository() to allow
further monkey patching and other external, API consumer related features.
2013-12-31 17:50:31 +01:00
Fabio Erculiani
4edaf614f4 [entropy.db.sql] in global context, the current thread is always MainThread 2013-12-31 17:38:57 +01:00
Fabio Erculiani
72aa0a07d1 [entropy.*] turn get_repository() into a classmethod 2013-12-31 17:30:29 +01:00
Fabio Erculiani
956b31d05e [entropy.db.sql] add overridable isMainThread method
a MainThread may be a "liquid" concept. A dedicated worker thread
may be considered a "MainThread" from the point of view of EntropySQLRepository.

_start_cleanup_monitor checks whether the calling thread is the MainThread
in order to determine if a cleanup thread should be started joining
the current thread. The problem with this approach is that if our
worker thread is a long lasting thread, we will end up with hundreds
of cleanup monitor threads waiting for the worker thread to terminate.
This will never happen though.

We can now reimplement isMainThread in order to tell the internal
function not to start the cleanup monitor thread also for arbitrary
threads (like the worker thread in RigoDaemon).
2013-12-31 17:24:24 +01:00
Fabio Erculiani
88ea4c7427 [entropy.client.services] fix typo in HTTP arguments for get_documents()
s/revision/rev/
2013-12-31 17:04:36 +01:00