thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

Fix location of metadata for F-Droid

Open cketti opened this issue 1 year ago • 9 comments

See https://gitlab.com/fdroid/fdroiddata/-/issues/3210

cketti avatar Mar 11 '24 13:03 cketti

It should pick up the location relative to the subdir directory. But it could be limited to the app build.

A quick fix could be to change the ´fdroiddata´ config to create a link to the fastlane folder ln -s app-k9mail/fastlane fastlane (not tested).

There are other apps using the same approach, but I checked and they are also broken.

wmontwe avatar Mar 12 '24 13:03 wmontwe

A consequence of this not working is to have two distinct repositories for K9-Mail and Thunderbird

wmontwe avatar Mar 12 '24 14:03 wmontwe

Compatible locations are listed here: https://gitlab.com/-/snippets/1895688#locations

Using /metadata/<packageName>/<locale> should work for having multiple apps in one repo.

Edit: I'm assuming packageName means application ID.

cketti avatar Mar 12 '24 14:03 cketti

https://gitlab.com/-/snippets/1895688#locations is not an official documentation and from fastlane docs, I don't see how that would work. But /metadata/<packageName>/<locale> is the data structure used for fdroiddata so maybe it also works in other repositories.

wmontwe avatar Mar 12 '24 16:03 wmontwe

Okay, it seems like /metadata/<packageName>/<locale> is supported: source. I'll go with that.

wmontwe avatar Mar 13 '24 12:03 wmontwe

With the change to /metadata/<packageName>/ structure it is possible to move the whole metadata into a submodule to not polute the repository with screenshots. This is even more needed when we're going to add the thunderbird app and it's variations.

wmontwe avatar Mar 14 '24 10:03 wmontwe

Are you sure /metadata/<packageName>/ in the app repository is working? The way I read the Python code it doesn't. It looks like /metadata/<packageName>/ is only there to support the data from the fdroiddata repository.

cketti avatar Mar 14 '24 12:03 cketti

I tested it and it works because of the os.walk, but I guess that this is not how it is supposed to work. The issue for us is, that fdroid update does not use the subdir property to search for the metadata. Which prevents us from having multiple apps in the same repository. I created a second app to validate the behaviour and found other issues.

The easiest solution is to create a symbolic link to place the metadata where fdroidserver expects it. I'm about to modify the fix to allow that and also the move of the metadata to another repository.

wmontwe avatar Mar 14 '24 14:03 wmontwe

Apparently our current solution doesn't work due to the way F-Droid builds its index: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/14815#note_1849173016

I suggest for now we update our realease instructions to manually add a symlink to the appropriate metadata directory and commit that change when doing a release.

cketti avatar Apr 07 '24 12:04 cketti

The symlink approach works with our new automation setup.

wmontwe avatar Nov 19 '24 10:11 wmontwe