Commit Graph

9601 Commits

Author SHA1 Message Date
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
Fabio Erculiani
5f63057c05 [Rigo/RigoDaemon] first chunk of code related to Application Management, WIP 2012-03-18 18:32:26 +01:00
Fabio Erculiani
5839d81819 [entropy.const] const_debug_write: add force argument support 2012-03-18 18:29:09 +01:00
Fabio Erculiani
efde0c2ec3 [Rigo/RigoDaemon] greatly simplify resource passing rendezvous
Completely move the arbitration to RigoDaemon, making Rigo passively
accepting the former requests.
Moreover, complete support for bottom notification area and start
implementing app management events.
2012-03-18 07:57:57 +01:00
Fabio Erculiani
4da1bd7a5c [Rigo] move LocalActivityStates to rigo.enums 2012-03-17 17:11:31 +01:00
Fabio Erculiani
3e94e1cf52 [Rigo] add bottomNotificationBox GtkVBox 2012-03-17 17:09:58 +01:00
Fabio Erculiani
9c0cbf8368 [Rigo] add Application.get_installed() method
get_installed() returns an Application object belonging to the
installed package if the current one is from available repos.
2012-03-17 17:08:14 +01:00
Fabio Erculiani
c62790b933 [entropy.db] add searchKeySlotTag()
Implement searchKeySlotTag(), it is the same as searchKeySlot() but
it also allows to specify package tag.
2012-03-17 17:05:39 +01:00
Fabio Erculiani
e7d22c33fe [Rigo] notify User in case of unavailable repositories 2012-03-16 16:05:08 +01:00
Fabio Erculiani
361c4166da [entropy.client] introduce Client.unavailable_repositories()
The method returns a sorted list of repositories identifiers
belonging to repositories that are unavaiable or invalid.
2012-03-16 16:04:15 +01:00
Fabio Erculiani
56fc484432 [Rigo] explicitly notify User when repositories have been updated 2012-03-16 14:58:43 +01:00
Fabio Erculiani
33175e3895 [Rigo] consolidate previous work
- Add User notifications before blocking on semaphores
- Fix several minor glitches related to features introduced the
  past week
- Cleanup rigo.enums from Software Center crapcode
- Improve Progress Bar interaction with User
2012-03-16 14:29:45 +01:00
Fabio Erculiani
ab0e36a313 [RigoDaemon] move PolicyKit actions to RigoDaemon 2012-03-15 17:42:57 +01:00
Fabio Erculiani
9fc23256e9 [Rigo] use PolicyKit to authenticate Repository Update 2012-03-15 17:30:42 +01:00
Fabio Erculiani
543fbda4f4 [RigoDaemon] implement PolicyKit support 2012-03-15 17:30:15 +01:00
Fabio Erculiani
d04e7de070 [Rigo] move completed Rigo View Controllers to separate modules 2012-03-15 15:54:07 +01:00
Fabio Erculiani
1affa249ca [RigoDaemon] move dbus configuration to separate module 2012-03-15 15:20:49 +01:00
Fabio Erculiani
629fca50b2 [Rigo] provide installed icon image 2012-03-14 23:24:00 +01:00
Fabio Erculiani
99cf283a94 [Rigo] force Gtk 3.0 by the beginning 2012-03-14 18:00:28 +01:00
Fabio Erculiani
b2f3bd5b8c [Rigo*] fifth daemon architectural design
- Introduce Activity states and busy(), unbusy() methods to allocate
and deallocate Daemon activities from the Clients, concurrently.

- Tokenize acquire_resources() and release_resources() to filter out
older events. The same token is returned to Clients via signals whenever
it makes sense (repositories_updated() is one of them).

- Implement Repositories Update Activity resume functionality in Rigo.
It is possible to close Rigo during a repo update and reopen it afterwards.
Multiple Rigo instances are allowed as well.

- Implement the ability for RigoDaemon to kindly request Rigo Clients
to release their locks (either shared or exclusive) due to new activity
being scheduled.

All the races and possible deadlocks should be handled correctly,
but due to the actual complexity, only time will tell.
2012-03-14 17:47:34 +01:00
Fabio Erculiani
b7d198c776 [entropy.client] Client, more locking cleanup
Never unlink() a lock when releasing it. This is quite bad when
used with shared locks.
At the same time, don't write any pid information in it, because
it's not always reliable (see previous commit).
2012-03-14 16:21:20 +01:00
Fabio Erculiani
f46922e6ca [equo] text_ui: re-acquiring entropy resources locks after exec() is bad
in Entropy Client library functions, we currently check if current
pid equals the one stored inside .using_resources file if lock
cannot be acquired in blocking mode. This is bad because the information
is not 100% reliable. The trick was there in order to allow equo
to exec*() without releasing the file locks. However, there could
be a race between lock and unlock Entropy Client methods that could
cause the former to unlink() a still valid lock file. This happens
now due to the introduction of non-exclusive locking support.
Get rid of all this shit then!
2012-03-14 16:17:18 +01:00