Commit graph

7 commits

Author SHA1 Message Date
Hans-Christoph Steiner
b1b30d13a4 set up config['ndk_paths'] on demand by reading source.properties
ndk_paths is set up right after installing the NDK and right before
ndk_paths is used in Build.ndk_path().

A proper NDK install always has a _source.properties_ which declares
the revision and release strings. That is used as the source of
revision and release.  This only reads from the local filesystem, and
reads the official source of version info (_source.properties_),
thereby avoiding any potential network calls that sdkmanager might
do. This implementation was inspired by @uniqx's:

ed931d47d7 (27b997d583cd1c0a05b2213437e0d9fe6536bfe3)
2025-11-11 15:56:01 +01:00
Hans-Christoph Steiner
b00b9c9390 metadata: get_single_build() for new subcommands
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
2025-10-09 17:00:58 +02:00
Licaon_Kter
8b54e2b4cf Remove UpstreamNonFree 2025-07-28 15:59:35 +02:00
linsui
7a98650ed3 Sort import
ruff check --fix --select I
2025-07-26 15:35:19 +00:00
Hans-Christoph Steiner
2f47938dbf standardize config on ruamel.yaml with a YAML 1.2 config
This is a key piece of the ongoing `PUBLISH` _config.yml_ migration. There was uneven implementation of which YAML parser to use, and that could lead to bugs where one parser might read a value one way, and a different parser will read the value a different way. I wanted to be sure that YAML 1.2 would always work.

This makes all code that handles config files use the same `ruamel.yaml` parsers.  This only touches other usages of YAML parsers when there is overlap.  This does not port all of _fdroidserver_ to `ruamel.yaml` and YAML 1.2.  The metadata files should already be YAML 1.2 anyway.

# Conflicts:
#	fdroidserver/lint.py
2025-03-10 08:48:58 +01:00
Hans-Christoph Steiner
66d220bd9f tests: rename testcommon module to shared_test_code
This name always confuses me, since there is also test_common.py. And this
module is not actually a test suite, even though it starts with "test".
This also makes for better tab completion, e.g.

python3 -m unittest tests/te[Tab] -> tests/test_
2025-01-27 10:11:19 +00:00
SilentGhost
7ff32bc4b0 Refactor TestCase files into python modules
Convert all TestCase files into standard python modules to be run and
discovered by unittest.
2024-11-20 10:37:52 +01:00
Renamed from tests/metadata.TestCase (Browse further)