Commit Graph

8972 Commits

Author SHA1 Message Date
Fabio Erculiani 3ee2e5cd56 [todo] update TODO 2012-03-27 18:27:45 +02:00
Fabio Erculiani da1a55a57f [Rigo] add app removal simulation cheatcode 2012-03-27 18:27:23 +02:00
Fabio Erculiani b58d1164c1 [todo] update TODO 2012-03-27 18:16:42 +02:00
Fabio Erculiani 0c506f5164 [RigoDaemon/Rigo] first chunk of App management code (install action only, incomplete) 2012-03-27 18:15:11 +02:00
Fabio Erculiani 4c954a9194 [entropy.client] _lock_resource: always increase lock reference count
Entropy Resouce Locks are reentrant, thus reference counted on lock()
and unlock() operations. For this reason, the counter must be increased
on every lock() request. This did not happen if the lock was already
held by the process with the unwanted effect of improperly releasing it.
This caused the "Calculating dependencies" glitch on each package
transaction.
2012-03-26 14:03:43 +02:00
Fabio Erculiani a20d8da868 [Rigo] ask for exit confirmation when there is local activity 2012-03-26 13:46:12 +02:00
Fabio Erculiani c659d4cbb4 [Rigo] dump threads every 30 seconds if --dumper is passed 2012-03-26 10:11:58 +02:00
Fabio Erculiani ee25f790af [Rigo/RigoDaemon] implement transaction state update notifications 2012-03-26 10:00:29 +02:00
Fabio Erculiani 72def71a07 [Rigo/RigoDaemon] implement Application License management 2012-03-25 18:02:54 +02:00
Fabio Erculiani ac8358772e [RigoDaemon] transaction_finished(): return AppTransactionOutcome struct 2012-03-25 11:02:04 +02:00
Fabio Erculiani 794e3a9134 [todo] update TODO 2012-03-24 20:15:07 +01:00
Fabio Erculiani abdb7dc53f [RigoDaemon] add reload() Dbus method
reload() is going to be used during RigoDaemon package
upgrade to kindly ask the Dbus service to reload itself as soon as
no more clients are connected.
2012-03-24 20:12:29 +01:00
Fabio Erculiani a3d82ff44f [RigoDaemon] expose daemon API version to Rigo 2012-03-24 19:53:08 +01:00
Fabio Erculiani f2f58e8616 [Rigo] list Application dependencies in App View 2012-03-24 17:30:46 +01:00
Fabio Erculiani 228e0a7da1 [entropy.db] add EntropyRepository.retrieveRuntimeDependencies() 2012-03-24 17:29:41 +01:00
Fabio Erculiani d1965b71ac [Rigo] show installed Application version if available 2012-03-24 16:35:12 +01:00
Fabio Erculiani 47b9570224 [Rigo] implement centralized Application transaction state 2012-03-24 16:07:39 +01:00
Fabio Erculiani dd46c23b20 [entropy.spm] PortagePlugin.add_installed_package: make sure to always run os.utime 2012-03-23 10:35:47 +01:00
Fabio Erculiani 99b20257a4 [entropy.client] handle _repodb_cache atomically
This prevents close_repositories() and _open_repository()
to concurrently mess with _repodb_cache, which is a dict, thus
not thread-safe.
2012-03-23 10:14:06 +01:00
Fabio Erculiani 115988a08c [entropy.client,entropy.server] drop __del__(), can be racey 2012-03-23 10:13:01 +01:00
Fabio Erculiani d465bb56e2 [entropy.db] EntropyRepository: use RLock() to handle connection pooling
This is much safer than being fault tolerant and shouldn't have any
tangible impact on performance
2012-03-23 10:07:48 +01:00
Fabio Erculiani af525fb0ea [Rigo] Entropy API: enforce the new singleton class 2012-03-23 10:04:49 +01:00
Fabio Erculiani ef28caff3b [RigoDaemon] reduce fake app management time 2012-03-23 10:03:51 +01:00
Fabio Erculiani 5bdaad7257 [Rigo] Application.get_extended_markup: fix typo in rwsem management
This could potentially cause Segmentation faults
2012-03-23 10:02:26 +01:00
Fabio Erculiani b093f24fbb [Rigo] enforce AppTreeView redraw whenever App state changes 2012-03-22 19:36:02 +01:00
Fabio Erculiani 6bce9168f0 [Rigo] call AppTreeView.clear_model() rather than model.clear()
This lets the view to reset its state accordingly to an empty model.
2012-03-22 19:35:14 +01:00
Fabio Erculiani 92e42ca3aa [entropy.db*] EntropyRepository, do not close() on object destruction
Closing the underlying sqlite3 db on object destruction (__del__())
causes funny race conditions when concurrently accessing the object
itself.

When the Garbage Collector tries to free memory, which can happen
when no more references pointing to self are used, by calling __del__()
(which called close()) it is possible to run into troubles if another
thread is inside a method of the same object holding a valid sqlite cursor.

Moreover, no external arbitration is possible if the garbage collection
gets in the middle and calls close() through the destructor on behalf
of a poor random innocent thread.

Solution is simple, destructor is evil and resource leaks have to be
handled where they actually are. Bye bye __del__().
2012-03-22 19:09:24 +01:00
Fabio Erculiani 6d0c2d93a8 [Rigo] wrap a dedicated rwsem around any EntropyRepository call
The ReadersWritersSemaphore object protects concurrent access
on EntropyRepository objects ensuring that they don't get closed
by RigoServiceController while in use.
2012-03-22 16:50:15 +01:00
Fabio Erculiani 30041ee0f2 [Rigo] implement App Install transaction validation checks and application-abort signaling 2012-03-22 08:40:31 +01:00
Fabio Erculiani b6c71301d6 [Rigo] NotificationBox: enable message text wrap 2012-03-22 08:39:32 +01:00
Fabio Erculiani 14023c39d1 [Rigo] add Application.is_installable() 2012-03-22 08:39:13 +01:00
Fabio Erculiani 539476d3a3 [Rigo] add package set search support via "@setname" 2012-03-22 08:20:54 +01:00
Fabio Erculiani 48c74e2db1 [Rigo] add Search Bar completion code, but keep it disabled due to Gtk3 bug 2012-03-21 23:41:28 +01:00
Fabio Erculiani 332b8ffe03 [Rigo] handle Application processing in AppTreeView widgets 2012-03-20 21:43:47 +01:00
Fabio Erculiani 53ec387cd5 [Rigo] AppTreeView: drop weirdo code from Software Center 2012-03-20 20:55:32 +01:00
Fabio Erculiani 196036ebd7 [Rigo] several App Install UI improvements 2012-03-20 19:44:09 +01:00
Fabio Erculiani 1c8872d610 [RigoDaemon] add action_queue_length() dbus method 2012-03-20 19:43:29 +01:00
Fabio Erculiani b9747f32ac [Rigo] Rework search thread locking, add more App Management code 2012-03-20 14:35:33 +01:00
Fabio Erculiani 43f929d8ef [Rigo] fix typo in string expansion 2012-03-20 14:34:25 +01:00
Fabio Erculiani efef827057 [Rigo] Add Application.is_removable() 2012-03-20 14:33:53 +01:00
Fabio Erculiani b4e9f9f78f [RigoDaemon] fix _busy(), also raise SameError (which is actually expected) 2012-03-20 14:33:02 +01:00
Fabio Erculiani 5557bf8b3f [entropy.misc] add non-blocking methods to ReadersWritersSemaphore 2012-03-20 14:32:37 +01:00
Fabio Erculiani 87fd48eafe [Rigo] introduce SharedLocker to avoid reentrancy of Entropy Resources Lock
There are two issues with Entropy Resources Lock when used in Rigo.
1. Reentrancy: this property is unwanted in Rigo due to the amount
   of time Entropy Resources Lock is acquired and released.
   It is always wanted to acquire once and release once.
2. Re-acquiring it is costly, this lock should be relased only when
   we are really forced to do so.
2012-03-20 07:58:13 +01:00
Fabio Erculiani b400b4bfea [RigoDaemon] rename is_exclusive() to exclusive() 2012-03-19 21:32:26 +01:00
Fabio Erculiani 7c132a9bf4 [RigoDaemon] drop text-based UrlFetcher progress output 2012-03-19 21:31:55 +01:00
Fabio Erculiani 9d5c88abce [Rigo] move RigoAuthenticationController to separate module 2012-03-19 18:54:25 +01:00
Fabio Erculiani aa49714d45 [RigoDaemon] simplify ping/pong protocol
Now that Entropy Resources are completely handled by RigoDaemon
in its activity code, there is no need to keep pinging clients
unless SIGUSR2 arrived.
SIGUSR2 signal will be later used to force RigoDaemon shutdown
in case of rigo package updates via Entropy, to avoid having incompatible
RigoDaemon versions running.
2012-03-19 18:51:00 +01:00
Fabio Erculiani 339b8a7417 [Rigo] Add Application Info to App Box in Work View Area 2012-03-19 10:25:02 +01:00
Fabio Erculiani 767bd7eb2a [Rigo] implement Application Information Box in Work Area 2012-03-18 23:14:52 +01:00
Fabio Erculiani 4b0945e724 [todo] update TODO 2012-03-18 18:32:41 +01:00