Commit Graph

89 Commits

Author SHA1 Message Date
Fabio Erculiani
895d6d7c96 [tests] db: move etpConst['keywords'] setup at the end of setUp method 2011-09-18 23:05:05 +02:00
Fabio Erculiani
bd81b92c6c [tests] db: make package files generated on amd64 work on other arches as well 2011-09-18 22:57:41 +02:00
Fabio Erculiani
15d922ff57 Revert "[tests] db: do not fail on atomMatch() due to different arch (fixes tests on ARM)"
This reverts commit 0feacbf90d.
2011-09-18 22:54:45 +02:00
Fabio Erculiani
6f48c86ab2 Revert "[tests] db: always use maskFilter=False with atomMatch()"
This reverts commit 2de803f314.
2011-09-18 22:54:29 +02:00
Fabio Erculiani
2de803f314 [tests] db: always use maskFilter=False with atomMatch() 2011-09-18 22:48:44 +02:00
Fabio Erculiani
0feacbf90d [tests] db: do not fail on atomMatch() due to different arch (fixes tests on ARM) 2011-09-18 22:42:47 +02:00
Fabio Erculiani
5a11057173 [tests] use assertTrue() instead of assert_(), fix Python3 warning 2011-09-06 23:47:28 +02:00
Fabio Erculiani
3ae8e6ae93 [entropy.server] make possible to split package file into multiple "extra" package files
This introduces a backward-compatible feature (server-side in this commit)
that makes possible to associate more than one package file to a single
package_id. This opens the door to a wide range of future opportunities
but also makes possible to decouple debuginfo files from the rest.
2011-08-08 18:16:54 +02:00
Fabio Erculiani
b83095ee46 [entropy.*] implement automatic config files update on package name moves 2011-07-17 16:18:04 +02:00
Fabio Erculiani
7fff2821c3 [tests] fix tests 2011-06-28 11:58:48 +02:00
Fabio Erculiani
0f0029b3ec [tests] db: fix test_use_defaults test 2011-05-06 16:39:40 +02:00
Fabio Erculiani
05fa5ab8f2 [tests] db: fix test_use_defaults test 2011-05-04 18:32:29 +02:00
Fabio Erculiani
72ea943a52 [entropy.spm] add disabled use flags to package use flags metadata 2011-04-27 11:38:53 +02:00
Fabio Erculiani
070427f9d8 [tests] db: fix test_db_metadata_handling, trigger metadata now contains slot 2011-03-25 17:29:20 +01:00
Fabio Erculiani
5421de7b74 [entropy.spm,entropy.db] add default use dependencies support 2011-03-21 16:12:51 +01:00
Fabio Erculiani
4f7e968e78 [entropy.client] Client: drop "noclientdb" argument (yay API break), replace with installed_repo, same (reversed) logic. 2011-03-05 16:39:03 +01:00
Fabio Erculiani
53a871ef0d [entropy.db] EntropyRepository, EntropyRepositoryBase: only return package_id from addPackage() and handlePackage() 2011-03-04 21:14:12 +01:00
Fabio Erculiani
7801132610 [tests] db: improve settings management test 2011-02-26 23:52:53 +01:00
Fabio Erculiani
cc36139bfc [entropy.db] uniform searchName, searchNameCategory, searchCategory, make them return frozenset instead of list 2011-02-13 10:11:12 +01:00
Fabio Erculiani
7738f688a6 [entropy.db] introduce EntropyRepositoryBase.repository_id() 2011-02-10 11:42:19 +01:00
Fabio Erculiani
57a3f2713e [tests] improve db.test_search test 2011-02-02 01:25:52 +01:00
Fabio Erculiani
342b48cdb4 [entropy.db] rename EntropyRepositoryBase.xcache to _caching and introduce caching()
Hide internal details regarding cache status handling. Rename
.xcache property to ._caching and provide a getter that returns
the cache setting status (caching()).
2011-01-23 13:09:03 +01:00
Fabio Erculiani
4f563dd9c3 [entropy.db] rename EntropyRepositoryBase "reponame" attribute to "name", keeping backward compat. 2011-01-17 00:55:24 +01:00
Fabio Erculiani
d2326171a4 [entropy.db] make some order among repository identifier metadatum storage inside EntropyRepository*
reponame attribute is now storing with 100% fidelilty the repository
identifier used to instantiate the EntropyRepositoryBase instance
through open_repository() and similar.
2011-01-17 00:28:42 +01:00
Fabio Erculiani
dba41146dc [tests] make content_safety test more reliable on different platforms 2010-11-26 23:08:30 +01:00
Fabio Erculiani
614bf6d436 [tests] add small sleep() to mitigate unittest multithreading bugs 2010-11-06 19:57:53 +01:00
Fabio Erculiani
ad1611c2fd [tests] add new EntropyRepository SQL schema tests 2010-10-04 19:18:01 +02:00
Fabio Erculiani
2a531dd014 [entropy.db] introduce SQL schema changes in EntropyRepository (small API break)
New SQL schema changes have been introduced to EntropyRepository,
keeping them disabled by default (older Entropy client have to be
flushed out first). The aim is to improve performance avoiding
extra SQL joins on baseinfo and extrainfo tables, thus removing
"categories", "flags", "licenses" tables (which missed external
keys also).
This upgrade is completely backward compatible and new schema is detected
at runtime, so the whole class can work with old and new one transparently.
The downside is that listPackageIdsInCategoryId() is no longer available and
has been replaced by a more generic listPackageIdsInCategory().
This new SQL schema will be hopefully enabled before the end of 2011.
2010-10-03 11:33:16 +02:00
Fabio Erculiani
770721dae4 [tests] add EntropyRepository.getSetting() test 2010-09-29 20:51:28 +02:00
Fabio Erculiani
a55ada4fca [tests] when calling Client.shutdown(), SystemSettings plugins are not removed now, so tests require to call destroy() first, then shutdown() 2010-09-25 12:05:57 +02:00
Fabio Erculiani
32f251feae [entropy.db] EntropyRepository.createAllIndexes: call "ANALYZE" stmt after indexes creation 2010-09-22 20:29:33 +02:00
Fabio Erculiani
caff8cc759 [entropy.db] rename EntropyRepositoryBase.closeDB() to EntropyRepositoryBase.close() keeping backward compatibility 2010-09-21 14:03:44 +02:00
Fabio Erculiani
ec94cceacd [entropy.tools] start moving Entropy dependency handling functions to entropy.dep module 2010-09-14 09:49:34 +02:00
Fabio Erculiani
1198a24290 [entropy.*] remove "eclasses" metadata support
"eclasses" package metadata is not in use in Entropy and is too
tight with Portage. Dropping.
2010-09-04 15:26:16 +02:00
Fabio Erculiani
778fa6c23e [tests] test "content safety" metadata 2010-08-30 12:50:26 +02:00
Fabio Erculiani
821d810aa3 [entropy.db/entropy.spm] introduce content safety metadata collection (sha256, mtime)
The following changes add more security features to Entropy repository
files. Every package will have new security metadata associated, like
sha256 and mtime of package files. Once all packages will contain
such information, the feature can be used, for example, to determine
if a system has been compromised by changing critical executables.
This is not a replacement for rootkit tools such as rkhunter or chkrootkit,
but instead, the base support for their file checking mechanism.

Entropy Client support (equo, mainly) is planned in the near future.
2010-08-28 17:07:15 +02:00
Fabio Erculiani
c86ba293f5 [entropy.db] EntropyRepositoryBase: prefer tuple over list when returning objects
This commit drastically changes EntropyRepository API, return object
are now either tuple or frozenset for most functions. This aims to
improve metadata reliability across function calls, making impossible
to change their content. Frozenset and tuple are immutable types.
2010-08-18 20:58:15 +02:00
Fabio Erculiani
571beaaf12 [entropy.db] several EntropyRepository changes, listed below
- overridden handlePackage, addPackage, removePackage in respective
  entropy.client.interfaces.db classes in a proper, secure way.
- overridden maskFilter in entropy.client.interfaces.db, the final
  goal will be removing its logic from EntropyRepository and move
  it to AvailablePackagesRepository only.
- removed any evidence of "client_repo" EntropyRepositoryPlugin(s)
  metadatum.
2010-08-01 00:29:18 +02:00
Fabio Erculiani
749a1b8263 [tests] db: add reverse dependencies test 2010-07-29 19:33:45 +02:00
Fabio Erculiani
e1e76d5b28 [entropy.db] first chunk of major entropy.db code updates, create abstract class, move logic there, update API 2010-06-07 17:56:05 +02:00
Fabio Erculiani
37fb97de01 [entropy*] kill SystemSettings attribute of Entropy Client and Entropy Server instances 2010-04-14 14:56:17 +02:00
Fabio Erculiani
21faf38121 [entropy.db/entropy.spm] complete per-package mimetype support
Per package file association info are now stored inside the
repository database. This allows for instance, to query a
mimetype and get a list of applications able to handle it, or
to get a list of mimetypes a package is aware of.
2010-03-29 18:16:01 +02:00
Fabio Erculiani
9b25177b22 [tests] db: fix EntropyCacher status handling 2010-03-28 22:51:58 +02:00
Fabio Erculiani
38c8f33f61 [entropy.client] more refactoring work in entropy.client.interfaces.methods 2010-03-13 22:19:44 +01:00
Fabio Erculiani
e6b841b02f [tests] update the way test scripts are executed when directly called 2010-03-07 22:15:50 +01:00
Fabio Erculiani
d676b73f9e [tests] improve db module tests speed 2010-02-13 19:23:17 +01:00
Fabio Erculiani
23962962e5 [tests] fix wrong mkstemp() call in db.py test 2010-02-13 12:59:19 +01:00
Fabio Erculiani
9da7ad8cdd [tests] db: use mkstemp instead of trying to write to $PWD 2010-02-11 18:30:04 +01:00
Fabio Erculiani
c5dd3a7a49 [entropy.db] remove more evidences of old branch management code 2010-02-05 14:20:12 +01:00
Fabio Erculiani
004d1055b2 [entropy.db] EntropyRepository: rename retrieveVersionTag to retrieveTag 2010-02-04 20:24:49 +01:00