Skip to content

flatpak: Build primary module from upstream when not in the source tree

Currently when building from a flatpak manifest Builder expects it to be in the project's source tree, so it builds it using the local project checkout instead of fetching the upstream one.

But when there's a flatpak manifest not belonging to the project's source tree (e.g. one of the flathub's app repository where there's only the manifest), it still believes it makes sense to build locally.

But in this case it doesn't make sense at all, since it would be expected to have Builder detect it's not in the project's source tree, and proceed to build the primary module from upstream instead.

So this commit fixes this, by checking if the primary module matches the project's root folder name, while ignoring case to detect it more accurately, and if it's not detected as an in-tree manifest, then it builds from upstream instead.

Merge request reports