Generally, when starting a new branch packages are not copied over
to avoid wasting disk space. So, old packages will be still pulled
in from old branch directories (under packages/). This commit adds
a function that automatically flush back old-branch packages into
the current one.
Let's say we have just bumped our repo from branch 1 to branch 2.
We have 3 packages into it that are still placed inside /packages/1.
Everything works until we decide to drop support from branch 1, in
this case, we would have to rebuild all these packages wasting a lot
of time. With "flushback" this is done automatically without touching
packages integrity.
_sync_run_download_queue accepted a list of tuples of size 2, there is
no need for such complex input since it just needs a plain path list.
Moreover, appending some code style updates too
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.
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.
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".