From 1927e59156006778c2429e4402fda0a0f552a5b2 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Tue, 24 Nov 2026 10:50:50 +0100 Subject: [PATCH] deb/local: treat quilt's already-pushed status as success quilt documents exit status 2 as "did not do anything", including pushing an already fully pushed stack. Treat that status as success when applying the series; any other non-zero status still aborts the build. --- src/deb/local.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/deb/local.rs b/src/deb/local.rs index 898b662..571ca00 100644 --- a/src/deb/local.rs +++ b/src/deb/local.rs @@ -1764,7 +1764,12 @@ fn apply_quilt_patches( ) .status()?; if !status.success() { - return Err("Failed to apply quilt patches ('quilt push -a')".into()); + // `quilt push -a` exits with 2 when the whole series is already + // applied (nothing left to do): that is success for our purpose. + // Any other failure is real (patch does not apply, series broken). + if status.code() != Some(2) { + return Err("Failed to apply quilt patches ('quilt push -a')".into()); + } } Ok(())