KeePassDX icon indicating copy to clipboard operation
KeePassDX copied to clipboard

Do not recommend beta versions in F-Droid

Open sergimn opened this issue 2 years ago • 7 comments

Describe the bug Currently, F-droid builds that are in a beta stage of 3.0.0 are being pushed as Suggested updates.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://www.f-droid.org/en/packages/com.kunzisoft.keepass.libre/'
  2. Scroll down to 'Packages'
  3. See error

Expected behavior This builds should not be suggested for installation to regular users and instead the version 2.10.5 should be the one that people install by default

Additional context This is just for F-droid

sergimn avatar Sep 06 '21 06:09 sergimn

I don't know how to specify to F-droid a stable version or not since the TAG name. If you have any clue, please put a link to the documentation.

J-Jamet avatar Sep 06 '21 07:09 J-Jamet

Aparently, the way to tell F-droid which is the current stable release is by telling it at the bottim of the .yml metadata file. In other words, lines 514-515 should be changed to

CurrentVersion:  2.10.5
CurrentVersionCode: 83

Which is the latest stable release

However, I'm not sure of the proper way to automate this whole thing

sergimn avatar Sep 06 '21 13:09 sergimn

OK for that, but how do we retain it automatically on a given version with the TAG name? The current version is updated automatically with the python script of the F-Droid server. As far as I know it is now not possible when the generation is done automatically when parsing the git. I don't want to make a manual request each time I release a version, the time of validation, it will already have to be changed to make a new request for a new stable version.

J-Jamet avatar Sep 06 '21 13:09 J-Jamet

Yep, I agree it doesn't scale really well. I'm not familiar with F-Droid app development but I'll look into whether I can do a PR to solve this

sergimn avatar Sep 06 '21 13:09 sergimn

This would be a good thing. An option to specify a keyword that prevents an automatic update from a TAG will be sufficient.

J-Jamet avatar Sep 06 '21 14:09 J-Jamet

I agree beta version should not be recommended on F-Droid. Right now the "suggested" version on F-Droid client is 3.5.0 Beta01 and this same version is returned by the F-Droid's API via the suggestedVersionCode field (I'm using a script which queries a number of packages to get their newest/suggested version)

Anyway I'm unsure how this can be fixed or automated, but here's what I found in F-Droid's Build Metadata Reference:

UpdateCheckIgnore

When checking for updates (via UpdateCheckMode) this can be used to specify a regex which, if matched against the version name, causes that version to be ignored. For example, ’beta’ could be specified to ignore version names that include that text.

Only Available with UpdateCheckMode HTTP.

Android-X13 avatar Sep 18 '22 14:09 Android-X13

Ok, I'll look at this. :)

J-Jamet avatar Sep 19 '22 16:09 J-Jamet

Only Available with UpdateCheckMode HTTP.

It's the problem here, UpdateCheckMode Tags is used by KeePassDX. https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.kunzisoft.keepass.libre.yml

This F-Droid feature should be updated first to be compatible with tags.

J-Jamet avatar Sep 25 '22 18:09 J-Jamet

@J-Jamet also check the documentation on Tags mode under UpdateCheckMode:

Optionally append a regex pattern at the end - separated with a space - to only check the tags matching said pattern. Useful when apps tag non-release versions such as X.X-alpha, so you can filter them out with something like .*[0-9]$ which requires tag names to end with a digit.

Could this solve the problem?

I'm not very familiar with the workings of F-Droid... That .yml file, is it edited by you? Maybe Tags isn't the most appropriate mode?

Android-X13 avatar Sep 25 '22 18:09 Android-X13

Could this solve the problem?

Yes it should, we have to test by adding the regex .*[0-9]$ at the end. (I think this feature was not present when the metadata file was created but it can be updated, this is a good thing.)

That .yml file, is it edited by you?

I have to make a pull request on the gitlab project. But first I have to test the correct implementation by following the procedure with a local machine (fdroid checkupdates and fdroid rewritemeta com.kunzisoft.keepass.libre)

J-Jamet avatar Sep 25 '22 19:09 J-Jamet

Assuming that release versions are always three 1- or 2-digit numbers like 3.10.4 the line should be something like this (I think):

Tags ^\d{1,2}\.\d{1,2}\.\d{1,2}$

That will filter out versions like 3.5.0 Beta01 which also end with a digit.

If you need anything just give a shout

Android-X13 avatar Sep 25 '22 19:09 Android-X13

https://gitlab.com/fdroid/fdroiddata/-/merge_requests/12361

J-Jamet avatar Jan 02 '23 12:01 J-Jamet