Commit Graph

9622 Commits

Author SHA1 Message Date
Fabio Erculiani b3b047be0d [solo.commands.update] use gi.introspection if available
Use the gobject-introspection GLib libraries instead of the old
ones if they are available, for the communication with RigoDaemon
in case of unprivileged repository update requests.
2012-08-26 16:18:02 +02:00
Fabio Erculiani 2041dc52db Tagging Entropy version 136 2012-08-26 16:02:18 +02:00
Fabio Erculiani f173b5850f Release Entropy 136 2012-08-26 16:02:18 +02:00
Fabio Erculiani 79c567afb5 [entropy.server.db] when download is complete, unlock all the mirrors
Unlocking just the working one causes the others to be left in
locked status until a manual unlock is issued.
2012-08-26 16:02:18 +02:00
Fabio Erculiani d1475cff31 [eit.commands.reset] subclass EitPull rather than EitPush 2012-08-26 16:02:18 +02:00
Fabio Erculiani ebc4ec7b08 [entropy.spm] look for modinfo inside /usr/bin
After more than 10 years people still change paths like this.
:-/
2012-08-26 16:02:18 +02:00
Fabio Erculiani 9dd85491f0 Tagging Entropy version 135 2012-08-26 16:02:17 +02:00
Fabio Erculiani 5b8de80fb4 Release Entropy 135 2012-08-26 16:02:17 +02:00
Fabio Erculiani 97e6fe31e8 [entropy.services] fix string format arguments 2012-08-26 16:02:17 +02:00
Fabio Erculiani aebc0571f3 [entropy.client.interfaces.db] fix undefined reference to TIMEOUT_FETCH_ERROR 2012-08-26 16:02:17 +02:00
Fabio Erculiani 9e725b510c [entropy.misc] fix undefined reference to class object 2012-08-26 16:02:17 +02:00
Fabio Erculiani 23ec7006f4 [entropy.spm] PortagePlugin: explicitly save err object 2012-08-26 16:02:17 +02:00
Fabio Erculiani 699bf4fe51 [entropy.db.sql] move methods used by _addPackage() into class 2012-08-26 16:02:17 +02:00
Fabio Erculiani 4cfe4306fe Tagging Entropy version 134 2012-08-26 16:02:17 +02:00
Fabio Erculiani 3cf0a0cee2 Release Entropy 134 2012-08-26 16:02:17 +02:00
Fabio Erculiani 76edd9f0a3 [entropy.client.package] filter out splitdebug paths if splitdebug is disabled
If splitdebug was previously enabled for a package, and its
files were installed, when splitdebug is turned off Package kept
printing collision messages about /usr/lib/debug files.
This happened because packages contain /usr/lib/debug paths in
their content metadata (even those with separate splitdebug tarballs)
and this wasn't cleared out before installed packages repository
metadata update. Thus, during the cleanup step, these paths popped out
generating invalid warnings.
2012-08-26 16:02:17 +02:00
Fabio Erculiani e17de72db8 [entropy.spm] ensure that Portage vdb cache is always invalidated
It happened that assign_uid_to_installed_package() did not explicitly
invalidate the Portage vdb cache and, while this is used inside
add_installed_package(), which did invalidate the vdb cache on its own
already, it is also called directly by entropy.client.interfaces.package
code.
Moreover, root= value wasn't properly handled throughout the execution
of add_installed_package(), which may have caused cache invalidation
issues described above.
2012-08-26 16:02:17 +02:00
Fabio Erculiani 8f7ed7a644 [Solo] add "solo update" command, the first real code port 2012-08-21 21:03:46 +02:00
Fabio Erculiani c7972c8519 [Solo] fixup code imports, add helper functions, migrate more code over 2012-08-21 21:03:46 +02:00
Fabio Erculiani 3becb6a215 [entropy.*] don't use magic constants for UrlFetcher errors 2012-08-21 10:51:45 +02:00
Fabio Erculiani 4567857b90 [entropy.fetchers] UrlFetcher: expose generic error codes via class property 2012-08-21 10:51:45 +02:00
Fabio Erculiani 28c61591cd [entropy.fetchers] MultipleUrlFetcher: join() threads explicitly
This avoids a potentially infinite loop if one of the threads dies
unexpectedly.
2012-08-21 10:51:45 +02:00
Fabio Erculiani 82ae020c40 [repo] remove empty README file 2012-08-21 10:51:44 +02:00
Fabio Erculiani 1582de0fff [Solo] First commit, equo rewrite has just begun
"Solo" is just a codename, to avoid name clashing while the code
is ported over.
2012-08-19 11:02:32 +02:00
Fabio Erculiani 2e6b176c83 [eit] do not raise any exception in sys.excepthook 2012-08-19 00:25:31 +02:00
Fabio Erculiani 796e71e9ac [repo] migrate shebangs to /usr/bin/python 2012-08-18 16:53:32 +02:00
Fabio Erculiani c9242e2517 [todo] update TODO 2012-08-18 10:13:46 +02:00
Fabio Erculiani d56cd777c8 [RigoDaemon] some minor Python 3.x related fixes 2012-08-18 09:53:18 +02:00
Fabio Erculiani facd0ec069 [equo] update entropy.pot 2012-08-18 09:51:14 +02:00
Fabio Erculiani 41adc104ca [equo] update translations 2012-08-18 09:50:58 +02:00
Fabio Erculiani e2c0ddb526 [Rigo] Python 3.x compatibility fixes 2012-08-18 09:44:26 +02:00
Fabio Erculiani 1f84203788 [entropy.spm] PortagePlugin: Python 3.x, use f.buffer.write() with bytes() 2012-08-17 22:42:36 +02:00
Fabio Erculiani fb6957e5fa [equo] fix UGC vote get command, do not require login credentials 2012-08-17 22:32:50 +02:00
Fabio Erculiani ff133b432a [entropy.services.client] restore Python 3.x compatibility 2012-08-17 22:30:45 +02:00
Fabio Erculiani 333e82ea10 [entropy.spm] PortagePlugin: keep keyslot as unicode, Python 3.x compatibility 2012-08-17 22:30:03 +02:00
Fabio Erculiani e90cb74c27 [entropy.spm] PortagePlugin: expose __next__() unconditionally 2012-08-17 21:41:08 +02:00
Fabio Erculiani 206fe49203 [entropy.db.sql] add __next__() to iterators, make Python3 happy 2012-08-17 21:40:55 +02:00
Fabio Erculiani 61eeaed14e [entropy.client.package] add __next__() to iterators, make Python3 happy 2012-08-17 21:40:35 +02:00
Fabio Erculiani 96976374fe [RigoDaemon] rewrite Installed Repository I/O event handler
Rewrite the serialization code of the I/O events coming in when
the Installed Packages Repository is modified (at filesystem level)
to better deal with bursts of events.
The new code uses a "baton" Semaphore as mutex that can be passed
through threads. The MainThread event handler function tries to
acquire the Semaphore in NB mode, if it does, it spawns a thread
that executes all the operations (acquire locks in blocking mode,
calculate updates, etc) and releases the Semaphore once done.

Olympic win!
2012-08-17 12:27:55 +02:00
Fabio Erculiani c5cf96ace0 [RigoDaemon] delay updates calculation by 20 seconds after locks are released 2012-08-17 11:03:58 +02:00
Fabio Erculiani a37d7ca195 [entropy.db.sqlite] move _addPackage() to entropy.db.sql 2012-08-16 21:35:45 +02:00
Fabio Erculiani 5a49098515 [entropy.db] move _getLiveCacheKey and __hash__ to entropy.db.sql 2012-08-16 21:30:51 +02:00
Fabio Erculiani a0394ba9a5 [entropy.db.sql] introduce _UPDATE_OR_REPLACE and move remaining SQL to entropy.db.sql 2012-08-16 21:20:46 +02:00
Fabio Erculiani 1b10177640 [entropy.db.sql] major cursor and connection pooling rework
The original idea was to avoid doing cursor and connection resources
cleanup (left by old and dead threads) synchronously every time
_connection() and/or _cursor() is accessed. This strategy also had
a huge drawback: with no activity on the object, resources were
left hanging there forever.

This commit introduces a better strategy for transparent and automatic
cleanup of resources belonging to terminated threads: every time a new
thread_id arrives at _cursor() or _connection(), a new daemon thread
starts and synchronizes with the caller through a simple Thread.join()
(because it's a daemon thread, we can join() daemon threads as well,
even if this is not really compliant with the specs, but it seems to work
just fine in Python).
When the caller thread is joined, it is possible to start the resources
cleanup procedure, carefully taking into account that thread_ids are
recycled and thus there might be clashing with newly created threads.

This helped a design issue to emerge from the sand (like a zombie
at the seaside): it is impossible to cleanup resources left by the
MainThread because this thread never ends living, and if it dies,
everything dies, obviously. So, the first implementation of this new
strategy was NOT touching the MainThread resources but then, the old
behaviour was to kill them as well on EntropyRepository.close().
So, the final version of this patch kept the old buggy behaviour of
touching MainThread stuff (nein, nein, nein, nein would Hitler say).
However, a new keyword argument "safe" has been added to the close()
method so it is possible to start migrating code to the dark side of the
power.

This means nothing really changed for API consumers yet, just entropy.db.sql
code being more efficient (no weird for loops and synchronous crap)
and actually faster (multi-threading ftw).
2012-08-15 20:59:45 +02:00
Fabio Erculiani f1c60ec30b [entropy.db.mysql] implement support for RestartTransaction through _proxy_call() 2012-08-14 19:27:20 +02:00
Fabio Erculiani 9a699e7ae8 [entropy.db.exceptions] introduce RestartTransaction exception
Exception raised in case the whole transaction has
been aborted by the database and caller is kindly
required to restart it from the beginning.
2012-08-14 19:27:20 +02:00
Fabio Erculiani 760685674e Tagging Entropy version 133 133 2012-08-14 17:51:30 +02:00
Fabio Erculiani 366396bfe7 Release Entropy 133 2012-08-14 17:51:29 +02:00
Fabio Erculiani 8d00d5beec [entropy.db.sql] make custom iterators work across multiple iterations 2012-08-14 10:26:22 +02:00
Fabio Erculiani a6286b0e21 [entropy.client.package] add one more note about the universal newline mode 2012-08-14 10:13:14 +02:00