]> git.ipfire.org Git - pakfire.git/commitdiff
build: Log a better message when a build has been interrupted
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Apr 2025 17:05:32 +0000 (17:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 16 Apr 2025 15:42:37 +0000 (15:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/build.c

index 1d1dfe51484554678fa3cb25f2f0f7d8e7bdd586..6fca0b7e17dac55e3e412dede7e8519e865378b7 100644 (file)
@@ -1415,8 +1415,15 @@ static int pakfire_build_stage(struct pakfire_build* build,
        // Run the script
        r = pakfire_jail_exec_script(build->jail, script, strlen(script), NULL, env,
                        NULL, NULL, pakfire_build_output_callback, build);
-       if (r)
-               ERROR(build->ctx, "Build stage '%s' failed with status %d\n", stage, r);
+       switch (r) {
+               case 130:
+                       ERROR(build->ctx, "The build has been interrupted\n");
+                       break;
+
+               default:
+                       ERROR(build->ctx, "Build stage '%s' failed with status %d\n", stage, r);
+                       break;
+       }
 
 ERROR:
        if (env)