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

Add an option to force the rebuild from a given module

Open lypwig opened this issue 5 years ago • 7 comments

I'm creating a flatpak that needs some dependencies that makes 2+ hours to compile.

I would like to work on the last modules without having to wait this much time each time I get an error. I found the --stop-at=MODULENAME, but is there a way to build starting from a specific module, avoiding to build again the modules before, something like --start-from=MODULENAME ?

  • Linux distribution and version: Manjaro
  • Flatpak-builder version: 1.0.9
  • Flatpak version: 1.5.0

lypwig avatar May 06 '20 06:05 lypwig

flatpak-builder should automatically skip the modules coming before it if you haven't modified them. (The exception iirc is file and directory sources, since they can't easily be checked to see go changed or not.)

On Wed, May 6, 2020, 1:49 AM Nathanaël [email protected] wrote:

I'm creating a flatpak that needs some dependencies that makes 2+ hours to compile.

I would like to work on the last modules without having to wait this much time each time I get an error. I found the --stop-at=MODULENAME, but is there a way to build starting from a specific module, avoiding to build again the modules before, something like --start-from=MODULENAME ?

  • Linux distribution and version: Manjaro
  • Flatpak-builder version: 1.0.9
  • Flatpak version: 1.5.0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/flatpak/flatpak-builder/issues/343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM4YSJQD5EFDYHSCWG6E6DRQEB7HANCNFSM4M2FUKEQ .

refi64 avatar May 06 '20 07:05 refi64

flatpak-builder should automatically skip the modules coming before it if you haven't modified them.

When I run flatpak-builder my_module org.my_module.my_module.yaml I get:

App dir 'cadquery' is not empty. Please delete the existing contents or use --force-clean.

And when I add --force-clean option, the build start from the beginning.

lypwig avatar May 06 '20 07:05 lypwig

I can't reproduce this now, I don't know what was wrong.

lypwig avatar May 08 '20 08:05 lypwig

In fact it seems that in some use case it's relevant to force the build from a specific module, for instance when changing the configure or test options.

lypwig avatar May 08 '20 09:05 lypwig

Just a hint: use --ccache!

eszlari avatar May 08 '20 11:05 eszlari

Just a hint: use --ccache!

In fact I would like to disable the cache, not enabling it. With the --force-clean option, I still have this:

Cache hit for my_module, skipping build

I want to force flatpak-builder to build again the module.

As far as I know, my only option is to rm -rf .flatpak-builder, but it starts from the beginning. It could be practical if I can do a similar thing but keeping the cache of some modules.

lypwig avatar May 10 '20 11:05 lypwig

It seems you are confusing something there.

The --ccache option enables ccache: https://ccache.dev

flatpak-builder's cache resides in $PWD/.flatpak-builder.

eszlari avatar May 10 '20 13:05 eszlari