Commit Graph

9565 Commits

Author SHA1 Message Date
Fabio Erculiani
a8e2bbd3ba [entropy.db.sql] do not catch any exception in commit() 2012-08-12 12:08:23 +02:00
Fabio Erculiani
3679fa966a [Rigo] increase search bar maximum entry length to 512 chars. 2012-08-12 12:05:50 +02:00
Fabio Erculiani
70c6823b90 [entropy.client.package] fix non-deterministic bug with Python File.readline()
This issue caused a load of issues with the ca-certificates.

Example of partial readline():
0|obj|/usr/share/ca-certificates/mozilla/NetLock_Arany_=Class_Gold=_F\xc3\x85
and the next call:
\xc2\x91tan\xc3\x83\xc2\xbas\xc3\x83\xc2\xadtv\xc3\x83\xc2\xa1ny.crt\n

Trying to workaround it by reading ahead if line does not end with \n
2012-08-12 11:53:50 +02:00
Fabio Erculiani
c5e80d4153 [entropy.db.sql] define a common API for Cursor and Connection wrappers 2012-08-12 11:39:36 +02:00
Fabio Erculiani
beb21f1660 [entropy.db] move other standard SQL code to entropy.db.sql 2012-08-12 10:29:41 +02:00
Fabio Erculiani
27a51598a0 [entropy.db] move most of the standard SQL code to entropy.db.sql 2012-08-11 21:58:41 +02:00
Fabio Erculiani
4ea217f3fd [entropy.db.mysql] replace FLOAT with REAL for mtime (FLOAT did not give enough precision) 2012-08-11 20:24:28 +02:00
Fabio Erculiani
74f7b4d730 [entropy.db.mysql] fix __iter__ support, iter(self._cur) MUST returned 2012-08-11 18:15:33 +02:00
Fabio Erculiani
7a950cb4b9 [entropy.db] abstract exceptions away from sqlite3
Wrap the Cursor object around and execute every method through
a proxy function that catches adapter-specific exceptions and
translates them into entropy.db.exceptions ones. This way Entropy
is eventually sqlite3 agnostic and adapters for several storage
engines can be written without affecting the rest of the codebase.
2012-08-10 21:35:50 +02:00
Fabio Erculiani
8ac22f4beb [entropy.client.package] FileContent*Reader: keep raising StopIteration() at the end 2012-08-10 17:51:22 +02:00
Fabio Erculiani
08a4343597 [entropy.client.package] add a bit of paranoia to Content*Writers' close() 2012-08-10 17:44:12 +02:00
Fabio Erculiani
2e6e790677 [entropy.db.sqlite] EntropyRepository.retrieveSignatures: check if table exists 2012-08-10 14:06:24 +02:00
Fabio Erculiani
0461ca413a [entropy.db] do not check if "settings" table exists, we're fault tolerant 2012-08-10 14:05:31 +02:00
Fabio Erculiani
90400c4ade [tests/db] drop SCHEMA_2010 related code 2012-08-10 14:05:05 +02:00
Fabio Erculiani
dc4556ef46 [entropy.db] create entropy.db.sql (holding standard SQL methods)
entropy.db.mysql and entropy.db.sqlite are now subclassing
EntropySQLRepository. Methods will be moved there during the
next forthcoming overhaul. Implement ModuleProxy support and
alleviate the exception class objects issue (sqlite3 based
exceptions are thrown by entropy.db.sqlite and oursql based
exceptions are thrown by entropydb.mysql, and there is no
easy/quick fix for this apparently, besides wrapping all the
cursor calls).
2012-08-10 11:41:29 +02:00
Fabio Erculiani
95d23764c3 [entropy.db.skel] move SETTING_KEYS and add ModuleProxy to EntropyRepositoryBase 2012-08-10 11:39:30 +02:00
Fabio Erculiani
23847b99eb [tests/server] directly import EntropyRepositoryCacher from entropy.db.cache 2012-08-10 11:38:55 +02:00
Fabio Erculiani
ea1922bc9d [entropy.db.mysql] fix typos in string format 2012-08-10 10:41:08 +02:00
Fabio Erculiani
8ebf92f17b [entropy.db.sqlite] enable _SCHEMA_2010_SUPPORT by default. 2012-08-10 10:24:57 +02:00
Fabio Erculiani
b65962382d [entropy.db.mysql] migrate to oursql (from MySQLdb) 2012-08-10 10:09:43 +02:00
Fabio Erculiani
e24bf78b63 [entropy.db.mysql] finalize schema (data types) 2012-08-10 10:09:18 +02:00
Fabio Erculiani
2bac80d76a [entropy.db.sqlite] catch OperationalError instead of Error 2012-08-09 17:25:11 +02:00
Fabio Erculiani
37e1d0f465 [entropy.db.sqlite] always enforce LIMIT 1 when using Cursor.fetchone()
Certain adapters don't clear cursor data automatically if fetchone()
is used and LIMIT 1 is not enforced.
2012-08-09 15:05:06 +02:00
Fabio Erculiani
ea17f96d99 [entropy.db.sqlite] check if settings table exists before spawning schema updates 2012-08-09 15:04:16 +02:00
Fabio Erculiani
690984caf4 [entropy.db.sqlite] fix query statement 2012-08-09 13:40:24 +02:00
Fabio Erculiani
7e6c9530c1 [entropy.db] move alignDatabases() to entropy.db.skel class 2012-08-09 13:40:04 +02:00
Fabio Erculiani
4ddc162428 [entropy.db.mysql] increase datatypes' size 2012-08-09 09:45:59 +02:00
Fabio Erculiani
462d98e4a8 Tagging Entropy version 132 132 2012-08-09 01:07:50 +02:00
Fabio Erculiani
56be066b5a Release Entropy 132 2012-08-09 01:07:48 +02:00
Fabio Erculiani
ac77ed6d9e [entropy.db.mysql] tweak some schema values 2012-08-09 01:01:41 +02:00
Fabio Erculiani
deb5947452 [entropy.db] expose EntropyRepositoryCacher via entropy.db 2012-08-09 01:01:41 +02:00
Fabio Erculiani
d71bf47e7d [entropy.client.package] relax "path" contraints and be tolerant against broken pkgs 2012-08-08 21:49:53 +02:00
Fabio Erculiani
34d464e7c6 [Rigo] PreferencesTreeView: add explicit "_" import 2012-08-08 21:42:10 +02:00
Fabio Erculiani
c9a5f2481d [Rigo] implement Application Groups support (in:groups keyword) 2012-08-08 21:41:41 +02:00
Fabio Erculiani
ad74ade00c [entropy.db] add MySQL connector (barely tested !!!) 2012-08-08 18:47:25 +02:00
Fabio Erculiani
a1e7d92bfb [entropy.db.sqlite] trivial fixes (remove imports, catch IOError, etc) 2012-08-08 17:10:20 +02:00
Fabio Erculiani
a7f958afd1 [entropy.db] split entropy.db package module into cache and sqlite 2012-08-08 11:11:42 +02:00
Fabio Erculiani
d7e33693b4 [equo] entropy-client-services has been replaced by rigo-daemon, update error message string 2012-08-08 00:41:23 +02:00
Fabio Erculiani
0c15d697a3 [entropy.spm] PortagePlugin._extract_pkg_metadata_content: filter out empty path strings 2012-08-08 00:37:40 +02:00
Fabio Erculiani
3ffbbcb49d [entropy.client.package] _generate_content_file: do not catch Exception
Move the os.remove() call to the finally block and detect failures via
a status boolean. This way, warnings won't be raised as exceptions.
2012-08-07 22:02:37 +02:00
Fabio Erculiani
58cb8adf96 [entropy.client.package] _generate_content_safety_file: do not catch Exception
Move the os.remove() call to the finally block and detect failures via
a status boolean. This way, warnings won't be raised as exceptions.
2012-08-07 22:02:21 +02:00
Fabio Erculiani
3294f9963b Tagging Entropy version 1.0_rc131 1.0_rc131 2012-08-05 22:33:42 +02:00
Fabio Erculiani
55472f77e2 Release Entropy 1.0_rc131 2012-08-05 22:33:41 +02:00
Fabio Erculiani
aa6edfccdc [Rigo] update translations 2012-08-05 22:32:50 +02:00
Fabio Erculiani
122396705d [Rigo] update translations 2012-08-03 16:31:46 +02:00
Fabio Erculiani
2b40390983 [Rigo] update rigo.pot 2012-08-03 16:31:01 +02:00
Fabio Erculiani
89b114f005 [Rigo*] implement mirrors optimization feature, see bug #3438 2012-08-03 16:26:52 +02:00
Fabio Erculiani
107e55a029 [RigoDaemon] fix polkit "Manage Configuration" message field (gnome-polkit guys are idiot!) 2012-08-03 16:17:21 +02:00
Fabio Erculiani
cc93458fd1 [entropy.client.methods] optimize reorder_mirrors() configuration commit code
Move reorder_mirrors() logic to benchmark_mirrors() for easier code
reuse. Avoid touching Repository objects and clearing SystemSettings
metadata but rather atomically update them in place.
2012-08-03 15:41:39 +02:00
Fabio Erculiani
87f882357f [entropy.client.methods] reorder_mirrors: make it atomic 2012-08-03 14:19:02 +02:00