Commit Graph

8923 Commits

Author SHA1 Message Date
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
Fabio Erculiani 7d262a71e2 [Rigo] implement resume support on Repositories Update 2012-03-13 23:35:50 +01:00
Fabio Erculiani 5d42022464 [RigoDaemon] wait on activity_mutex before releasing resources lock 2012-03-13 23:34:42 +01:00
Fabio Erculiani 6a4da6c261 [rigo] fifth architectural design iteration, things should work now 2012-03-13 16:05:40 +01:00
Fabio Erculiani 7d2633f2a0 [entropy.client] _lock_resource: avoid to deadlock when _unlock_resource is called 2012-03-13 16:05:40 +01:00
Fabio Erculiani 63e9764bfa [entropy.db] EntropyRepository: mtime() can return OSError, need to cope with it 2012-03-13 16:05:40 +01:00
Fabio Erculiani 4816c90e80 [rigo] trivial comment fix 2012-03-13 14:31:20 +01:00
Fabio Erculiani 6bb4f6b28c [entropy.db] EntropyRepository: validate Live cache against mtime()
Scenario: Process A is writing to EntropyRepository, adding new
package entries. Process B is reading from EntropyRepository,
querying for the same package entries, for example by using
retrieveKeySlot(). This method uses a dict-based cache to speed
up things, but this should be invalidated also when the mtime()
value changes.
2012-03-13 09:01:49 +01:00
Fabio Erculiani 40343d0719 [rigo] fifth RigoDaemon architecture iteration, let's see... 2012-03-12 23:47:29 +01:00
Fabio Erculiani cd9a2b1220 [rigo] only connect signals when needed, fix YES/NO dialog on exit during activity 2012-03-12 17:05:53 +01:00
Fabio Erculiani 9584c0ae71 [entropy.cache] better handle sleeping in EntropyCacheWriter thread
Make sure we never block on stop() but also we never run for nothing.
Now calling release() as many times as calling acquire()
2012-03-12 16:50:40 +01:00
Fabio Erculiani 5649c1dc80 [entropy.cache] trivial tweaks to cacher thread 2012-03-12 16:26:15 +01:00
Fabio Erculiani 1270c28fd9 [rigo] first chunk of RigoDaemon integration code, still WIP 2012-03-12 00:36:16 +01:00
Fabio Erculiani d2ef8c8005 [todo] update TODO 2012-03-12 00:36:15 +01:00
Fabio Erculiani 50ebb63cc7 [rigo-daemon] third architectural design iteration, still WIP 2012-03-12 00:36:15 +01:00
Fabio Erculiani caf2e2192d [entropy.db] atomMatch: versions can be an empty set
When matching >=dev-lang/python-2.6 having some weird mask, it
can happen to end up having no matches left after the last
checkpoint. Make sure to handle the case even on the very last mile
2012-03-11 19:36:41 +01:00
Fabio Erculiani 1f334138fb [entropy.client] reorder_mirrors: hostname property can be None
If mirror string (URL string) is malformed, the hostname object
property can be None.
2012-03-11 18:53:42 +01:00
Fabio Erculiani f294ec3c1d [rigo-daemon] second architectural design iteration, starting to look good 2012-03-11 17:54:10 +01:00
Fabio Erculiani 0e9491082b [entropy.misc] introduce ReadersWritersSemaphore object 2012-03-11 12:33:29 +01:00
Fabio Erculiani 62a67600d8 [entropy.misc] drop MasterSlaveLock, no longer used 2012-03-11 12:14:52 +01:00
Fabio Erculiani 912bf15702 [rigo] emphasize the App View exit button 2012-03-09 18:00:21 +01:00
Fabio Erculiani 7fb23c224f [rigo-daemon] first commit, introduce RigoDaemon dbus service 2012-03-09 17:29:55 +01:00
Fabio Erculiani 37133e2ab2 [entropy.client] add Client.promote_resources()
Promoting a previously acquired shared Entropy Resources Lock to
an exclusive one is now possible via Client.promote_resources().
2012-03-09 09:42:27 +01:00
Fabio Erculiani 9b52c0f04a [entropy.client.interfaces.repository] provide unlocked_sync() method
As done with entropy.security, unlocked_sync() will make possible
for callers to handle the Entropy Resources Lock on their own.
2012-03-09 09:32:06 +01:00
Fabio Erculiani 922fc34d7e [entropy.client.interfaces.db] do not touch lock files permissions
Entropy Resources Lock file is in the etpConst['etpdatabaseclientdir']
directory. For this reason, it is better to not touch the whole
directory but just the subdirs.
2012-03-08 22:49:38 +01:00
Fabio Erculiani 3195a23689 [entropy.security] add Security.unlocked_sync()
unlocked_sync() works just like sync() but without acquiring the
Entropy Resources Lock. This way it's possible to externally control
the mutual exclusion.
2012-03-08 21:44:13 +01:00
Fabio Erculiani b379bbc8ad [entropy.misc] FlockFile: add try_promote() method 2012-03-08 21:43:29 +01:00
Fabio Erculiani 6ba23248ff [rigo] properly clean ImageBoxes from app view on hide 2012-03-07 18:10:29 +01:00
Fabio Erculiani 9659ce6633 [rigo] fix misc, trivial bugs 2012-03-07 17:12:55 +01:00