There is no longer any reason for these to be intertwined.
This deliberately avoids touching some files as much as possible because
they are super tangled and due to be replaced. Those files are:
* fdroidserver/build.py
* fdroidserver/update.py
# Conflicts:
# tests/testcommon.py
# Conflicts:
# fdroidserver/btlog.py
# fdroidserver/import_subcommand.py
This moves all of the serverwebroot: logic into a function, and adds tests.
I did this because I ran into issues in the logic in main():
Traceback (most recent call last):
File "/builds/eighthave/fdroidserver/fdroid", line 22, in <module>
fdroidserver.__main__.main()
File "/builds/eighthave/fdroidserver/fdroidserver/__main__.py", line 230, in main
raise e
File "/builds/eighthave/fdroidserver/fdroidserver/__main__.py", line 211, in main
mod.main()
File "/builds/eighthave/fdroidserver/fdroidserver/deploy.py", line 753, in main
s = serverwebroot.rstrip('/').split(':')
AttributeError: 'dict' object has no attribute 'rstrip'
Since update_serverwebroot() is part of the public API, this function should
work without setting `fdroidserver.deploy.options` or
`fdroidserver.deploy.config`.