Commit Graph

4115 Commits

Author SHA1 Message Date
Fabio Erculiani 472366c966 unit testing, db: add 2 new tests 2009-04-29 14:52:17 +02:00
Fabio Erculiani dc18e0f36b entropy.client/server/db: improve non-ASCII metadata handling.
extract_pkg_metadata now returns data in UTF-8 format and does it
correctly. This avoids failures on 'equo database generate' and
weird conversion conditions. Moreover, this commit should not break
backward compatibility since this is properly handled in entropy.db
methods.
2009-04-29 14:50:21 +02:00
Fabio Erculiani a37c9f2198 entropy.server: improve support for expiration based packages removal 2009-04-26 01:01:25 +02:00
Fabio Erculiani 2deebc2ab6 Community Repositories: make it back working.
Community Repositories support was broken due to codebase changes
and introduction of SystemSettings, which now overwrites any
overridden setting. This commit fixes all the issues and also
improves the current support.
2009-04-25 23:21:30 +02:00
Fabio Erculiani a7faac4d03 entropy.server: add support for expiration-based packages removal.
If enabled in server.conf, entropy server side interface can now
allow multiple packages in the same scope without forcefully being
'injected'.
Through packages.db.fatscope in database dir, you can choose what
packages are eligible to this status, you can use '*' wildcard to
enable the feature for all the packages.

Be warned, this feature is EXPERIMENTAL (read server.conf) and not
enabled by default.
2009-04-25 22:32:18 +02:00
Fabio Erculiani 1cf472e97a SystemSettings: external parsers (given by plugins) will run in
alphabetical order
2009-04-25 22:31:08 +02:00
Fabio Erculiani 8c37428a52 entropy.client: remove old configuration files protection and masking code.
Since configuration files protection is now gathered per-package, there is
no more need of having the same (and broken) metadata into SystemSettings.
2009-04-25 19:07:49 +02:00
Fabio Erculiani 0bc96e24d9 entropy.client: fix configuration files protection and masking.
Using a database-wide CONFIG_PROTECT metadata is not wise and triggers
several issues, every package during install and removal should
use their own information (as in CONFIG_PROTECT and CONFIG_PROTECT_MASK)
2009-04-25 18:56:22 +02:00
Fabio Erculiani f34be7c999 move SystemSettings generic file parser to entropy.tools so that
can be reused by other areas of the codebase
2009-04-25 08:41:24 +02:00
Fabio Erculiani 6882ac24f9 entropy.client.misc: do_backup(), change backup files prefix 2009-04-25 07:51:34 +02:00
Fabio Erculiani 39ae6a3bb2 entropy.client.misc: use os.rename instead of shutil.move in scanfs.
Along with using os.rename instead of shutil.move in scanfs, restrict
the range of exceptions catched when calling load_cache.
2009-04-25 07:44:16 +02:00
Fabio Erculiani 63e43f2517 entropy.const: use new entropy.tools gzip/bzip2 unpack functions 2009-04-24 17:45:59 +02:00
Fabio Erculiani d8a1d90eb7 entropy.const: fix another typo in const_create_working_dirs 2009-04-23 16:09:21 +02:00
Fabio Erculiani b75e26268f entropy.const: fix typo, SyntaxError 2009-04-23 16:08:44 +02:00
Fabio Erculiani 22133c4f1b entropy.const: const_create_working_dirs, improve reliability 2009-04-23 13:08:23 +02:00
Fabio Erculiani fdd6288510 entropy.client.interfaces.package: match_checksum, better workaround
package signatures generated with buggy entropy git versions
2009-04-22 00:25:59 +02:00
Fabio Erculiani de921f39f0 entropy.client.interfaces.package: match_checksum fix
it can happen that no package signatures are available: if this is
the case, completely skip the signature verification.
2009-04-22 00:08:05 +02:00
Fabio Erculiani 58be209dc6 entropy.client.interfaces.package: trivial match_checksum output change 2009-04-21 08:29:09 +02:00
Fabio Erculiani 97f84255f5 entropy.db: cache unlock message output to avoid to flood the user 2009-04-21 08:28:22 +02:00
Fabio Erculiani 330b292247 entropy.client.interfaces.package: implement package signatures verification
when available.

SHA1, SHA256 and SHA512 are now checked client side together with MD5. This
improves package download reliability. Moreover, improve match_checksum method
to better handle error cases.
2009-04-21 00:49:54 +02:00
Fabio Erculiani b3424c587f entropy.server.interfaces: properly set signatures on package changes 2009-04-21 00:46:33 +02:00
Fabio Erculiani 96b610a75f entropy.db: new method setSignatures 2009-04-21 00:45:29 +02:00
Fabio Erculiani 13635788e5 entropy.db: retrieveTrigger, return empty string if no trigger is found 2009-04-21 00:29:34 +02:00
Fabio Erculiani 157a001354 entropy.services.interfaces: remove variable init which causes class
to fail loading
2009-04-20 21:57:18 +02:00
Fabio Erculiani 1c46d90cf9 unit testing: add server unit testing module 2009-04-20 20:39:17 +02:00
Fabio Erculiani 707da3675f entropy.server: ease fake repository init 2009-04-20 20:26:51 +02:00
Fabio Erculiani 125c20754d entropy.server: improve behaviour when server database is not physically
available and when running in fake mode
2009-04-20 20:25:26 +02:00
Fabio Erculiani f1bb40959c entropy.server: fix close_server_databases 2009-04-20 20:04:43 +02:00
Fabio Erculiani 0a28af0ee6 unit testing, db, client: cleanly close Client instances 2009-04-20 20:01:26 +02:00
Fabio Erculiani 437bbec087 entropy.server: add support for in-memory repositories 2009-04-20 20:00:46 +02:00
Fabio Erculiani 282924f76a unit testing, client: add 3 more tests 2009-04-20 18:23:14 +02:00
Fabio Erculiani a113bafb9a SystemSettings: fix typo in update method 2009-04-20 18:22:07 +02:00
Fabio Erculiani 8d4aac54c4 entropy.client.interfaces.methods: complete support for in-memory
repositories.

In-memory repositories support was partially implemented some time
ago. This commit completes the support.
Please consider that those kind of repositories are never closed
when calling close_all_repositories method and you have to call
remove_repository to effectively destroy all memory data.
Also, consider this feature EXPERIMENTAL and not for daily usage,
in other words, use it with brain ON!
2009-04-20 17:48:04 +02:00
Fabio Erculiani 1d6551f98f entropy.client.interfaces.dep: fix typo in calculate_world_updates 2009-04-20 17:10:28 +02:00
Fabio Erculiani 089d753c25 entropy.client.interfaces.trigger: drop entropy cache purging trigger,
will be moved to ebuild
2009-04-20 16:43:42 +02:00
Fabio Erculiani a86b68143e entropy.client.interfaces.methods: fix typo in SystemSettings path 2009-04-19 23:34:36 +02:00
Fabio Erculiani 8c44519a2f entropy.client.interfaces.client: workaround dependency issue in
parsers of ClientSystemSettingsPlugin
2009-04-19 23:23:34 +02:00
Fabio Erculiani f33b24a9c3 entropy.server.interfaces.mirrors: fix undefined variable in upload_database 2009-04-19 20:32:07 +02:00
Fabio Erculiani fe4faeaf18 entropy.server: implement ability to disable certain EAPIs.
This improvement allows to disable certain EAPIs from being handled
on download/upload, thus on remote repository database sync. This
was warmly awaited from repository maintainers with limited internet
bandwidth.
2009-04-19 20:28:14 +02:00
Fabio Erculiani fa276f4f1e entropy.db: check if server plugin is loaded in SystemSettings 2009-04-19 19:54:08 +02:00
Fabio Erculiani 392db878f3 entropy.client: fix typo in ClientSystemSettingsPlugin.misc_parser 2009-04-19 19:52:12 +02:00
Fabio Erculiani 0c5c9879ba entropy.client: move SystemSettings client parser to ClientSystemSettingsPlugin 2009-04-19 19:50:28 +02:00
Fabio Erculiani 89e6bcc6db entropy.misc: fix typo in server plugin id retrieval 2009-04-19 19:43:41 +02:00
Fabio Erculiani 46a18b88e4 entropy.server: move server related settings to a separate SystemSettings
plugin. Also migrate all the entropy code to use the new SystemSettings
dict variables path.
2009-04-19 19:29:22 +02:00
Fabio Erculiani 759d4876a8 entropy.server.interfaces.main: cache read/write repository database
sync calls to avoid running it more than once for every uncached
open_server_repository method call.
2009-04-19 18:47:43 +02:00
Fabio Erculiani 0bf855ed4e entropy.server.interfaces.main: remove unused package_match_validator_cache
dict
2009-04-19 18:45:13 +02:00
Fabio Erculiani a4044a8ea8 entropy.server.interfaces.main: open_server_repository, remove unused
t_ident parameter from database instance load cache
2009-04-19 18:42:14 +02:00
Fabio Erculiani 10f5b704ee unit testing, client: add empty client unit testing module 2009-04-19 10:35:18 +02:00
Fabio Erculiani 0a901a3de6 entropy.*: move atom matching package masking validation cache to
SystemSettings
2009-04-19 10:23:55 +02:00
Fabio Erculiani e54c027534 unit testing, db: add package sets test, test package masking in test 2 2009-04-19 09:50:19 +02:00