Commit Graph

11031 Commits

Author SHA1 Message Date
Fabio Erculiani cd199b0496 [entropy.client.dep] fix format string typo 2013-12-26 22:52:12 +01:00
Fabio Erculiani a8bdb9a4ea [entropy.cache] drop EntropyCacher.CACHE_IDS['critical_update'] 2013-12-26 22:52:12 +01:00
Fabio Erculiani 034061620c [entropy.cache] drop EntropyCacher.CACHE_IDS['world_masked'] 2013-12-26 22:52:12 +01:00
Fabio Erculiani 01e54a75b9 [entropy.cache] drop EntropyCacher.CACHE_IDS['world_available'] 2013-12-26 22:52:12 +01:00
Fabio Erculiani 55f5d892aa [entropy.client.settings] add installed packages repository locking support 2013-12-26 22:52:12 +01:00
Fabio Erculiani e976ea337c [entropy.client.methods] add installed packages repository locking support 2013-12-26 22:52:12 +01:00
Fabio Erculiani b4f445a61b [entropy.client.repository] drop entropy_updates_alert argument
This is no longer useful for the implemented use cases
2013-12-26 22:52:12 +01:00
Fabio Erculiani cf3305ed43 [entropy.client.repository] do not check the instance type of installed_repository
This check is no longer needed
2013-12-26 22:52:12 +01:00
Fabio Erculiani d2c47cc3ba [entropy.client.db] add installed packages repository locking support 2013-12-26 22:52:12 +01:00
Fabio Erculiani 12c34ab8d4 [entropy.client.dep] add installed packages repository locking support 2013-12-26 22:52:12 +01:00
Fabio Erculiani f143614555 [entropy.client.client] add installed packages repository locking support 2013-12-26 22:52:12 +01:00
Fabio Erculiani f5efd44cc2 [RigoDaemon] acquire UpdatesNotificationResourceLock in non blocking mode
We cannot sleep with the activity mutex held without affecting
parallelism so badly. Otoh, we cannot wleep on UpdatesNotificationResourceLock
without affecting 3rd party clients in a way that we would starve them
for a while. So, try to acquire the file lock in non blocking mode
and if it fails, reschedule a new call as soon as the same lock is
freed (exclusive acquire succeeds). This assumes that if the lock
is held back, we will just re-do the whole trick again and again.
2013-12-26 22:52:12 +01:00
Fabio Erculiani f1a925c220 [solo.commands.install] acquire the notification lock in shared NB mode
This should avoid starvation in the scenario outlined in code comments.
2013-12-26 22:52:12 +01:00
Fabio Erculiani ec198d632b [RigoDaemon] make sure that the serializer is always released
Even in case of exceptions.
2013-12-26 22:52:12 +01:00
Fabio Erculiani bccbce4a34 [RigoDaemon] use UpdatesNotificationResourceLock to avoid signal spam
If this resource lock is acquired, block until the lock is released
so that we will not keep sending status updates to the connected clients
2013-12-26 22:52:12 +01:00
Fabio Erculiani 00f43b043c [solo.commands.install] acquire the UpdatesNotificationResourceLock in shared mode
This will temporarily disable available updates notifications from
RigoDaemon
2013-12-26 22:52:12 +01:00
Fabio Erculiani 6f44f5c40a [entropy.locks] UpdatesNotificationResourceLock: do not dictate any particular lock mode 2013-12-26 22:52:12 +01:00
Fabio Erculiani 934a7ce14b [RigoDaemon] drop sleep()
With the new locking strategy, this is no longer necessary
2013-12-26 22:52:12 +01:00
Fabio Erculiani 69d4473249 [entropy.locks] introduce UpdatesNotificationResourceLock
This will make possible to stop available updates notifications
from being issued while an install/upgrade is in progress
2013-12-26 22:52:12 +01:00
Fabio Erculiani 8049f88c56 [entropy.locks] make sure not to leak fds when using non-blocking calls 2013-12-26 22:52:12 +01:00
Fabio Erculiani ca862463d4 [entropy.locks] make sure not to leak fds when using non-blocking calls 2013-12-26 22:52:12 +01:00
Fabio Erculiani cf8984982a [entropy.output] sychronize writes to stdout/stderr to avoid garbled output
In a multithreaded scenario, text may get garbled if there is no
synchronization between threads wrt the shared resources (std{out,err}).
This happens even when stdio buffering is enabled, of course.
2013-12-26 22:52:12 +01:00
Fabio Erculiani 8ed4bff872 Revert "[entropy.client.package] synchronize text output calls to avoid garbled output"
This reverts commit e722455432317516235e56fb386a60f05d237804.
2013-12-26 22:52:11 +01:00
Fabio Erculiani a0ec911e68 [entropy.client.package] synchronize text output calls to avoid garbled output
Some parts of the package actions code are now multithreaded and some
other will likely become that in the near future.
For this reason, all the TextInterface.output calls are now wrapped and
synchronized by a mutex.

Ideally, this synchronization could have gone directly into entropy.output
but I am reluctant about placing expensive locking so deep into the code at
this time.
2013-12-26 22:52:11 +01:00
Fabio Erculiani ca3b960dca [entropy.client.sets] make Sets a new-style class 2013-12-26 22:52:11 +01:00
Fabio Erculiani c2d15ddd23 [entropy.client.misc] add sharedinstlock and exclusiveinstlock decorators 2013-12-26 22:52:11 +01:00
Fabio Erculiani 0df7092e05 [entropy.locks] drop "_lock", just "acquire" or "release", it's cleaner 2013-12-26 22:52:11 +01:00
Fabio Erculiani 1f2575204e [entropy.locks] make ResourceLock reentrant wrt to individual threads only 2013-12-26 22:52:11 +01:00
Fabio Erculiani 3a448a3b19 [entropy.client.package] use atom as part of the unpack directory
This greatly reduce the size of the path, mitigating the issue at bug #4078
2013-12-24 15:57:40 +01:00
Fabio Erculiani 0cb12a0dae [entropy.misc] RSS: be more tolerant against xml file corruptions 2013-12-20 13:03:32 +01:00
Fabio Erculiani f6dd07cb0d Tagging Entropy version 255 255 2013-12-18 11:00:10 +01:00
Fabio Erculiani 24b5b8c661 Release Entropy 255 2013-12-18 11:00:10 +01:00
Fabio Erculiani 304f57434f [entropy.db.skel] filterTreeUpdatesActions: warn and fix illegal circular slotmoves
See gentoo-dev ML thread called "Doing and then undoing slotmoves"
2013-12-18 10:59:26 +01:00
Fabio Erculiani 5bafa6e755 [entropy.spm] PortagePlugin: make __get_portage_update_actions protected 2013-12-18 09:50:28 +01:00
Fabio Erculiani c9629b9457 [entropy.spm.skel] allocate_protected_file: python2 os is not unicode friendly 2013-12-17 22:09:55 +01:00
Fabio Erculiani ea52b8630b [entropy.client.package] _handle_config_protect: python2 os module is not unicode friendly 2013-12-17 21:56:24 +01:00
Fabio Erculiani 1e16119560 [eit.commands] remove leading ">>" string from ask_question() message. 2013-12-16 19:53:36 +01:00
Fabio Erculiani beff483d19 [solo.commands] remove leading ">>" string from ask_question() message. 2013-12-16 19:53:11 +01:00
Fabio Erculiani 53cbf979c5 [eit.commands.cp] make sure to open the source repository in rw
This will trigger treeupdates and the collected package identifiers
will not become stale.
2013-12-16 16:26:27 +01:00
Fabio Erculiani 9b78a9b6a0 [entropy.db.sqlite] lock_path() should not use id(self) for memory repositories 2013-12-15 10:50:13 +01:00
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 a8e902b0a5 [eit.commands] rename call_unlocked to call_shared, call_locked to call_exclusive 2013-12-12 22:17:36 +01:00
Fabio Erculiani 3e528ae1ae [solo.commands.*] rename call_unlocked to call_shared, call_locked to call_exclusive 2013-12-12 22:15:47 +01:00
Fabio Erculiani bf724d9b39 Tagging Entropy version 254 254 2013-12-12 21:24:25 +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 1f6dd35001 Tagging Entropy version 253 253 2013-12-12 20:11:50 +01:00
Fabio Erculiani da31e2b49d Release Entropy 253 2013-12-12 20:11:50 +01:00