This copies build_local() from build.py into newly created (hidden)
subcommands: `prepare_source` and `build_local_run`. It also
breaks up the long body of the build_local function into smaller
functions.
I have no idea what is causing this to fail, but the mkdtemp pattern used
in other test files seems to fix it.
https://gitlab.com/fdroid/fdroidserver/-/jobs/11776468083
======================================================================
ERROR: test_main (tests.test_signatures.SignaturesTest.test_main)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builds/fdroid/fdroidserver/tests/test_signatures.py", line 28, in test_main
with TemporaryDirectory() as tmpdir, TmpCwd(tmpdir):
^^^^^^^^^^^^^^
File "/builds/fdroid/fdroidserver/tests/shared_test_code.py", line 44, in __enter__
self.orig_cwd = os.getcwd()
^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
----------------------------------------------------------------------
For the build automation, there will be lots of subcommands that are meant
to run in scripted environments. They are not intended for interactive use.
Although they sometimes might be useful interactively, they might also
sometimes be dangerous to run interactively because they rely on the
presense of a VM/container, modify the local environment, or even run
things as root.
The new subcommands operate on a single APPID:VERSIONCODE pair, so this new
function fetches the metadata needed for that operation, and includes any
required checks.
The algorithm came from:
uniqx/fdroidserver@2b779e6599
This reworking of it includes:
* removed `check_disabled`, seems like the scheduler should handle that? If
it is required, it can be added later.
* standard variable names
* fixed spelling errors and hopefully improved docstrings
* black format
* added tests
* standardized the strings, made them localizable
Currently translated at 13.7% (80 of 582 strings)
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 13.7% (80 of 582 strings)
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 13.7% (80 of 582 strings)
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 12.0% (70 of 582 strings)
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 12.0% (70 of 582 strings)
Translated using Weblate: Hebrew (he) by Yaron Shahrabani <sh.yaron@gmail.com>
Currently translated at 10.6% (62 of 582 strings)
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/he/
Translation: F-Droid/F-Droid Server
Currently translated at 99.8% (581 of 582 strings)
Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>
Currently translated at 99.8% (581 of 582 strings)
Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>
Currently translated at 99.8% (581 of 582 strings)
Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>
Currently translated at 99.8% (581 of 582 strings)
Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>
Currently translated at 99.8% (581 of 582 strings)
Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>
Currently translated at 99.8% (581 of 582 strings)
Translated using Weblate: Serbian (sr) by Саша Петровић <salepetronije@gmail.com>
Currently translated at 99.8% (581 of 582 strings)
Co-authored-by: Саша Петровић <salepetronije@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/sr/
Translation: F-Droid/F-Droid Server
Currently translated at 100.0% (582 of 582 strings)
Translated using Weblate: Portuguese (Portugal) (pt_PT) by ssantos <ssantos@web.de>
Currently translated at 100.0% (582 of 582 strings)
Translated using Weblate: Portuguese (pt) by ssantos <ssantos@web.de>
Currently translated at 99.8% (581 of 582 strings)
Translated using Weblate: Portuguese (Portugal) (pt_PT) by ssantos <ssantos@web.de>
Currently translated at 99.8% (581 of 582 strings)
Co-authored-by: ssantos <ssantos@web.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/pt_PT/
Translation: F-Droid/F-Droid Server
Currently translated at 100.0% (582 of 582 strings)
Translated using Weblate: Tamil (ta) by தமிழ்நேரம் <anishprabu.t@gmail.com>
Currently translated at 100.0% (582 of 582 strings)
Translated using Weblate: Tamil (ta) by தமிழ்நேரம் <anishprabu.t@gmail.com>
Currently translated at 98.1% (571 of 582 strings)
Translated using Weblate: Tamil (ta) by தமிழ்நேரம் <anishprabu.t@gmail.com>
Currently translated at 98.1% (571 of 582 strings)
Translated using Weblate: Tamil (ta) by தமிழ்நேரம் <anishprabu.t@gmail.com>
Currently translated at 98.1% (571 of 582 strings)
Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ta/
Translation: F-Droid/F-Droid Server
Currently translated at 100.0% (582 of 582 strings)
Translated using Weblate: Japanese (ja) by Liner Seven <linour7gmekiblo@gmail.com>
Currently translated at 100.0% (582 of 582 strings)
Translated using Weblate: Japanese (ja) by Liner Seven <linour7gmekiblo@gmail.com>
Currently translated at 100.0% (582 of 582 strings)
Translated using Weblate: Japanese (ja) by Liner Seven <linour7gmekiblo@gmail.com>
Currently translated at 100.0% (582 of 582 strings)
Co-authored-by: Liner Seven <linour7gmekiblo@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ja/
Translation: F-Droid/F-Droid Server