flatpak-builder icon indicating copy to clipboard operation
flatpak-builder copied to clipboard

flatpak-builder dependency resolution and caching is unpredictable

Open alexlarsson opened this issue 8 years ago • 3 comments

From @matze on February 15, 2017 9:33

I'm building a flatpak for Inkscape which has several dependencies and build times are getting out of hand partly due to flatpak-builder's inability to specify proper dependencies and tendency to invalidate its cache entries for no particular reasons. For example, I just added another post-install command to the last module, yet, almost all other modules are rebuilt.

Copied from original issue: flatpak/flatpak#568

alexlarsson avatar Aug 25 '17 09:08 alexlarsson

In general flatpak-builder doesn't do dependencies in that way. Its just a ordered build, and everything after the changed thing gets rebuilt. However, it stores the exact build id of the sdk in the cache, so things get rebuilt if the sdk isupdated, which tends to happen now and then.

I agree that this is a bit overkill, as sdk:s are supposed to be ABI stable (unless you're building against a git-master sdk build). So, in flatpak master I've changed this to not take the sdk into account for the cache unless you specify --rebuild-on-sdk-change.

alexlarsson avatar Aug 25 '17 10:08 alexlarsson

If the sdk didn't change and it still rebuilt everything when you just changed the last module, that would be a bug, and we need to look into that.

alexlarsson avatar Aug 25 '17 10:08 alexlarsson

From @matze on February 15, 2017 9:53

so things get rebuilt if the sdk isupdated, which tends to happen now and then.

I see and will have a closer look next. But anyway, I'll try flatpak master for the next builds. Thanks!

alexlarsson avatar Aug 25 '17 10:08 alexlarsson