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(())