External Publication
Visit Post

Looking for assistance with fixing an app's metadata

F-Droid Forum [Unofficial] February 24, 2026
Source

First time I’ve ever contributed to F-Droid, written metadata, or worked with linux utilities like sed so I’m a little out of my comfort zone here. I’ve opened an issue at this point, and have dove in to see if I can learn anything. As you can probably tell from the history, I’m struggling a little to come up with a solution.

From discussions in the F-Droid Matrix server, my understanding is that I need to somehow get the versionName and Code information into the Gradle build. The suggested method for this was using sed to edit the build file and put in the static information prior to build. Using sed beyond a quick and basic string manipulation was beyond me, so I’ve been going down a path of providing a patch file that patches out the multiline code the upstream author created, replaces it with simple tokens which I then use sed to replace with the static version info. This is turning out to be problematic, because as I’ve discovered, the patch command may fail or succeed depending on the current working directory of its command. In a test run, I’m able to confirm that the patch succeeds so long as the working directory is within the app subfolder of the upstream’s code (which is also specified in the build metadata.) However, if I try to use the patch: key in build metadata, this fails, I can only assume because the patch command is running from a different working directory, and I’m not sure how to manipulate the diff/patch file to make it succeed here.

Any suggestions to make this succeed would be greatly appreciated!

Discussion in the ATmosphere

Loading comments...