Commit Graph

2300 Commits

Author SHA1 Message Date
Fabio Erculiani 0e8d1c304c entropy.client: fix unreferenced variable, my fault 2009-05-12 16:41:05 +02:00
Fabio Erculiani 4eefede7c6 entropy.Client: rework calculate_world_updates when using ignore-spm-downgrades
So we have several nasty issues when using ignore-spm-downgrades here.
First of all, calculate_world_updates should get the setting directly from
SystemSettings instead of bugging developer asking for it.
Secondly, calculate_world_updates should return a 4D tuple, also containing
the matches ignored when ignore-spm-downgrades is enabled.
Moreover, Spritz packages.py getPackageItem featured an unused argument,
which has been dropped.

I know this commit is a bitch because we are talking about changing API
and affecting several files at once.
2009-05-12 14:14:02 +02:00
Fabio Erculiani ca8129af60 entropy.server.interfaces: move_packages, make supa-sure that queue
does not contain dupies
2009-05-10 17:04:41 +02:00
Fabio Erculiani a97e726622 entropy.transceivers: implement support for FtpInterface.get_file_md5 in FtpServerHandler
The aim is to make php handlers not always required when there is a FTP
server that supports "SITE MD5" commands (like proftpd with mod_md5).
This commit makes FtpServerHandler able to handle such feature and avoid
using any other external hook. If server support is found, this verification
is enough. If support is broken, FtpServerHandler will try to fallback to
previously supported features, if enabled (use_handlers variable).
Moreover, FtpServerHandler now makes use of entropy.tools.is_valid_md5
instead of just checking if provided strings are long 32 chars.
2009-05-10 16:29:30 +02:00
Fabio Erculiani d18be0cfec entropy.tools: new function is_valid_md5 (self explanatory) 2009-05-10 16:23:56 +02:00
Fabio Erculiani faafaa1b0c entropy.transceivers: FtpInterface add method get_file_md5.
Proftpd server with mod_md5 supports SITE MD5 <filepath> that actually
retrieves the md5 hash of the provided filepath.
This commit add support for it. The aim is trying to use SITE MD5 instead
if available instead of using crappy php hooks that in our world are called
"repository handlers".
2009-05-10 13:46:11 +02:00
Fabio Erculiani 9669e7683f entropy.server.interface: when move_packages is done, always run dependencies test 2009-05-09 13:43:10 +02:00
Fabio Erculiani f5d8f12bb2 entropy.server.interfaces: move_packages, fine tune output 2009-05-09 13:27:45 +02:00
Fabio Erculiani 6d68012f67 entropy.qa: _get_deep_dependency_list, always discard -1 in returning set 2009-05-09 13:27:20 +02:00
Fabio Erculiani 70e9eb4f7d entropy.server.interfaces: fine tune output on move_packages 2009-05-09 13:22:59 +02:00
Fabio Erculiani 0a4333886f entropy.db: rename WriteLock to __write_mutex 2009-05-09 12:49:28 +02:00
Fabio Erculiani 844c40f05e entropy.client.interfaces.methods: do not clear SystemSettings when running in dry-run mode 2009-05-07 17:31:38 +02:00
Fabio Erculiani 5582fd2efd SystemSettings: move live package masking metadata to persistent settings 2009-05-07 17:30:28 +02:00
Fabio Erculiani 6b71cb80c0 entropy server: move_packages, add new argument pull_deps
This option will allow repository packages move/copy pulling in all
the dependencies of every package selected.
2009-05-07 14:12:10 +02:00
Fabio Erculiani 6287413522 QA interface: improve _get_deep_dependency_list method 2009-05-07 14:11:37 +02:00
Fabio Erculiani c7a0d62879 entropy.db: improve utf8 and str input support of insertLicenses 2009-05-05 05:59:13 +02:00
Fabio Erculiani e7ca06ce96 unit testing, db: add test for insertLicenses with str input 2009-05-04 17:41:55 +02:00
Fabio Erculiani 8669bec923 entropy.db: insertLicenses, add support for both unicode and str input 2009-05-04 17:41:26 +02:00
Fabio Erculiani 908a50f1f1 entropy.client.interfaces.package: fix __update_available_cache
__update_available_cache wasn't working correctly: available cache
was not updated correctly, causing get_available_packages returning
wrong information when cached.
2009-05-04 00:24:00 +02:00
Fabio Erculiani 1a90a00f25 entropy.client.interfaces.fetch: set/unset default mirror to MirrorStatus 2009-05-03 23:55:36 +02:00
Fabio Erculiani b04cbc6d9a entropy.client.mirrors.StatusInterface: add two new methods.
Add set_working_mirror and add_failing_working_mirror methods with
the aim of increasing the usefulness of the class.
2009-05-03 23:40:28 +02:00
Fabio Erculiani 1599a3ae30 transceivers: avoid showing negative data transfers 2009-05-03 18:57:21 +02:00
Fabio Erculiani 7c1c69df13 entropy.client.interfaces.trigger: fix ebuild postinstall and preinstall trigger when merge_from mode is used 2009-05-03 15:29:23 +02:00
Fabio Erculiani 7dae8b0bde entropy.client.interfaces.dep: fix generate_dependency_tree
On some circumstances, post dependencies got a deplevel of 0, which
was overwritten by conflicts data. This patch fix the issue by
making deplevels >= 0 to always start from 1, leaving deplevel = 0
to conflicting packages.

Moreover, this patch improve generate_dependency_tree performance.
2009-05-03 14:57:20 +02:00
Fabio Erculiani 2c3f9fe24a entropy.db: skip tables that cannot be dropped on initializeDatabase 2009-05-02 18:12:14 +02:00
Fabio Erculiani 615d4cac1b entropy.client.interfaces.Client: properly fill validRepositories
When repo_validation is False, validRepositories list was not filled
properly on __init__. This commit fixes the issue.
2009-04-30 11:21:10 +02:00
Fabio Erculiani e47d1c4f3d entropy.misc: LogFile, fix write to non-existent files (crate them) 2009-04-30 10:20:33 +02:00
Fabio Erculiani dd4d378f76 entropy.spm: fix PortagePlugin.use_reduce to work with unicode too 2009-04-29 15:47:33 +02:00
Fabio Erculiani ab237ea0d4 entropy.db: regenerateCountersTable, open counter file safely 2009-04-29 15:44:52 +02:00
Fabio Erculiani e894e9254f unit testing, db: add another package metadata handling test 2009-04-29 15:42:15 +02:00
Fabio Erculiani d1f1ff1c00 entropy.client.interfaces.metadata: when extracting license, make sure
that it is read correctly.

It can happen that licenses are written in UTF-8 directly, as previous
commit states.
Moreover, make sure that there's a perfect match between what is returned
by get_pkg_metadata and entropy.db.getPackageData
2009-04-29 15:40:25 +02:00
Fabio Erculiani 86347bf7da entropy.db: improve retrieveChangelog and retrieveLicensedata methods
There are certain changelogs and licenses which are written in UTF-8
directly, so, we should consider this case too
2009-04-29 15:39:18 +02:00
Fabio Erculiani 823882278a fix issue that caused the client repository to not being loaded
because of db errors in LocalRepository.__init__()
2009-04-29 15:09:07 +02:00
Fabio Erculiani 8649b444b8 entropy.client.interfaces.dep: remove deprecated methods 2009-04-29 15:00:54 +02:00
Fabio Erculiani 0a24291320 entropy.client.interfaces.methods: remove deprecated methods 2009-04-29 14:59:48 +02:00
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