1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-14 21:10:09 +02:00
Commit Graph

3490 Commits

Author SHA1 Message Date
Daniel Martí
4482ba971d gradle: stop trying to patch outputFile
This often breaks since we're just removing a single line. Instead, use
a much more reliable way of finding output apks.
2015-12-31 09:47:14 +01:00
NeroBurner
1683df0cf8 handle Queue 2015-12-29 20:11:47 +01:00
NeroBurner
0e0767492e Octal numbers 0600 to 0o600 2015-12-29 20:10:04 +01:00
NeroBurner
5ca182a20d except named exception handling 2015-12-29 20:09:27 +01:00
NeroBurner
af38f151a2 Change print-function to have brackets 2015-12-29 20:06:46 +01:00
Daniel Martí
967472408b Add NonFreeAssets anti-feature 2015-12-29 12:39:48 +01:00
Daniel Martí
20ced3f303 Small gradle wrapper fix
It broke on cases like:

	if (gradle.gradleVersion >= "2.2") {
2015-12-24 23:08:31 +01:00
Daniel Martí
5b8d593275 gradle: Completely get rid of gradlepluginver
We can support multiple output dirs without having to detect/infer the
plugin version. Much simpler and more robust too.
2015-12-24 16:41:39 +01:00
Daniel Martí
138618937f gradle: Never add lintOptions workaround
This breaks on newer plugin versions. Instead of complicating this logic
even further to support them, upstream devs should instead use gradle
configs that actually work.

If their build fails because of lint, it's theirs to fix, not ours.
2015-12-24 16:40:36 +01:00
Daniel Martí
adff5615f5 Fix issues spotted by older pyflakes 2015-12-16 16:42:50 +01:00
Daniel Martí
03b6662324 Merge branch 'docs' into 'master'
docs: Add information on binary verification

I added a section about `Binaries:` metadata field. However, my information might be wrong or outdated, since I barely used it by now. Maybe even this field was left out on purpose...

See merge request !83
2015-12-10 11:50:36 +00:00
Daniel Martí
020160f1e8 Merge branch 'summarylength' into 'master'
docs: Adjust summary length



See merge request !85
2015-12-10 11:47:48 +00:00
Boris Kraut
531a165daf docs: Adjust summary length 2015-12-10 12:42:05 +01:00
Daniel Martí
013315bf10 Open metadata files in only one place
Also get rid of the useless get_default_app_info func.
2015-12-07 20:31:23 +01:00
Daniel Martí
c2304b3315 lint: optionally check format 2015-12-07 20:12:26 +01:00
Daniel Martí
fa0dcf5449 lint: fix issue found by older version of pyflakes 2015-12-07 13:58:29 +01:00
Daniel Martí
5541cb83ac checkupdates: fix --auto build copy
Also, remove origlines which hasn't been used in some time.
2015-12-07 12:39:04 +01:00
Daniel Martí
02c59a327b stats: fix a few dict accesses left over 2015-12-07 12:33:24 +01:00
Daniel Martí
ae5b8ed496 import: fix get_default_app_info usage
Closes #129
2015-12-05 19:20:41 +01:00
Daniel Martí
7a7d36feef scanner: remove jni check
buildjni=no is the default. Moreover, some apps now run ndk-build via
gradle, so this was just in the way.
2015-12-04 19:32:01 +01:00
Daniel Martí
3101ad6c39 Set all list defaults to an actual list
Iterating over the defaults will crash otherwise. Update pickle files.
2015-12-04 00:08:42 +01:00
Daniel Martí
cb8d93e443 Fix tests by not checking private attributes
All attrs starting with '_' (e.g. _foo or __bar) are used internally, so
not very relevant for the metadata test anyway.
2015-12-03 19:31:20 +01:00
Daniel Martí
2711f1c868 Also skip unmodified fields in the regex checks
Now it's close to 1s.
2015-12-03 17:02:24 +01:00
Daniel Martí
ea99add3da Keep track of what attrs were modified in apps/builds
This allows us to run checks and fix types only on those that were
really modified. On our fdroiddata repo, with 2k apps with many unset
fields and flags, this reduces readmeta runtime from ~1.3s to ~1.1s.
2015-12-03 16:46:21 +01:00
Daniel Martí
8c2e1fedfc Actually check that bools are valid
The metadata check was omitting booleans and lists, as it was only
taking strings. Fix this.
2015-12-03 16:35:46 +01:00
Daniel Martí
7b575e3fdd Remove need for rstrip() of txt description 2015-12-03 16:19:33 +01:00
Daniel Martí
a9bb5f9713 metadata: write strings directly to txt file 2015-12-03 14:00:47 +01:00
Daniel Martí
28566f6e57 Rename metafieldtype to fieldtype
For consistency with flagtype. Also less redundant.
2015-12-03 13:53:49 +01:00
Daniel Martí
2c095df947 Use dicts for field/flag types 2015-12-03 13:52:53 +01:00
Daniel Martí
cd4e43c3c2 Some more readability/performance tweaks
* Use set() instead of dict()
* No 'if foo: True else: False'
* Don't check for invalid fields twice
2015-12-03 13:02:54 +01:00
Daniel Martí
b1a9180d12 Use constants for field/flag types
Avoids typos, such as one I just found which was 'strsng' isntead of
'string'. The static analyzer can catch those if they are constants.
Comparing ints is also faster than strings, which adds up in readmeta.
2015-12-03 12:55:19 +01:00
Daniel Martí
992406de0e Avoid conflicting func/var names 2015-12-03 12:41:50 +01:00
Daniel Martí
1b43d8e33c Make text formatting faster via StringIO
Avoid concatenating strings over and over. Also, the wiki formatting
wasn't necessary at all since it was just joining lines.
2015-12-03 12:02:47 +01:00
Daniel Martí
088929711c Represent multiline fields as str, not list
Only keep lists in metadata files in the json format, since they don't
support multiline strings that are readable.

This makes the internal code easier, and a bit faster.
2015-12-03 11:36:15 +01:00
Daniel Martí
c8cc054c8b Fix tests 2015-12-03 11:16:27 +01:00
Daniel Martí
97c991c4b6 Some more txt parsing tweaks after profiling 2015-12-03 11:06:27 +01:00
Daniel Martí
490da2da22 Remove duplicate build_flags check
It's already checked in set_flag
2015-12-03 10:59:48 +01:00
Daniel Martí
1987ee7f54 Remove gradle=main
It was only supported in txt metadata, and was unused in fdroiddata
anyway.
2015-12-03 10:56:59 +01:00
Daniel Martí
5e0bc7f2c3 Properly close all metadata files once read 2015-12-03 10:51:27 +01:00
Daniel Martí
96f1fc5355 Never use exit/log in metadata 2015-12-02 22:59:58 +01:00
Daniel Martí
b9ac6fb69a Speed up metadata reading
Total time for `fdroid readmeta` went down from ~1.6s to ~1.4s on my
machine.
2015-12-02 22:38:40 +01:00
Daniel Martí
528e45d22b Simplify post_metadata_parse usage 2015-12-02 22:29:31 +01:00
Daniel Martí
c975531d87 metadata: properly store nums as strs and bools as bools 2015-12-02 20:49:42 +01:00
Daniel Martí
71a5eac494 Pre-compile more regexes 2015-12-02 20:40:30 +01:00
Daniel Martí
7e28e0ed90 lint: warn about target= in gradle builds 2015-12-02 20:28:08 +01:00
Daniel Martí
a566ee4475 Fix default update= on ant builds 2015-12-02 20:16:25 +01:00
Daniel Martí
bf8518ee8f Rework build into a class
This simplifies usage, goes from

    build['flag']
to
    build.flag

Also makes static analyzers able to detect invalid attributes as the set
is now limited in the class definition.

As a bonus, setting of the default field values is now done in the
constructor, not separately and manually.

While at it, unify "build", "thisbuild", "info", "thisinfo", etc into
just "build".
2015-12-02 20:03:11 +01:00
Daniel Martí
2c12485aeb gradle script: properly iterate over known versions 2015-12-02 19:17:08 +01:00
Daniel Martí
6e87a8c45a Add documentation to new App class 2015-11-28 17:19:59 +01:00
Daniel Martí
ab614ab442 Rework app into a class
This simplifies usage, goes from

	app['Foo']
to
	app.Foo

Also makes static analyzers able to detect invalid attributes as the set
is now limited in the class definition.

As a bonus, setting of the default field values is now done in the
constructor, not separately and manually.
2015-11-28 17:11:05 +01:00