flatpak-builder
flatpak-builder copied to clipboard
"git" type source works only as the first source
From @Jehan on February 13, 2017 1:40
Trying to work around another bug of flatpak, I tried to add a "script" source and I put it before the "git" source in the list. When it came to building the module, I got:
========================================================================
Building module gimp in /home/jehan/gimp/build/flatpak/.flatpak-builder/build/gimp-8
========================================================================
fatal: destination path '/home/jehan/gimp/build/flatpak/.flatpak-builder/build/gimp-8' already exists and is not an empty directory.
Error: module gimp: Child process exited with code 128
I understand the issue: flatpak tries to clone the git directory which requires no directory or an empty one. I would propose to either make it possible (clone in a temporary directory and move all files after for instance), or at least write down in the documentation that if a module has multiple source, and among them there is a git source, it has to be first in the list.
Copied from original issue: flatpak/flatpak#555
Having multiple git sources works, it just that the way flatpak-builder works the sources are extracted, in the specified order, inside the build directory. Two git checkouts cannot be in the same directory (because the .git directory would collide), so you have to define "dest": "some/subdir" in one or both of the git repo sources to check it out in separate directories.
Although you're right in that if you mix a git repo with say an archive, then it would work without dest if you had the right order.
This issue was moved to flatpak/flatpak-builder#16