diff options
author | Martin Quinson <martin.quinson@loria.fr> | 2013-12-17 15:03:51 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2013-12-17 15:03:51 +0100 |
commit | 3b88b2976a2e59cba312838fca6a688231f0c60f (patch) | |
tree | 37da0f8753f88b2813e0fa62bf87fe3d42742a12 | |
parent | d35030c2a4475aab71d1e78e73452daba1911e1a (diff) | |
download | quilt-3b88b2976a2e59cba312838fca6a688231f0c60f.tar.gz |
Return 2 (instead of 1) when there is nothing to do
This is mandatory to differentiate "error" and "everything's done".
This really eases the scripting around quilt, for example in Debian's
patchsys-quilt.mk.
It used to works this way until quilt 0.33, and was broken accidentally
(in commit 188c7dac) for "quilt push".
Closes Debian bug #358792:
http://bugs.debian.org/358792
-rw-r--r-- | quilt/push.in | 2 | ||||
-rw-r--r-- | quilt/scripts/patchfns.in | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/quilt/push.in b/quilt/push.in index 34a23f0..450edf1 100644 --- a/quilt/push.in +++ b/quilt/push.in @@ -356,7 +356,7 @@ else [ -z "$opt_all" ] && number=1 fi -stop_at_patch=$(find_unapplied_patch "$stop_at_patch") || exit 1 +stop_at_patch=$(find_unapplied_patch "$stop_at_patch") || exit [ -z "$opt_verbose" ] && silent_unless_verbose=-s [ -n "$opt_force" ] && opt_leave_rejects=1 diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in index 325c012..f5e5f6a 100644 --- a/quilt/scripts/patchfns.in +++ b/quilt/scripts/patchfns.in @@ -588,7 +588,7 @@ find_unapplied_patch() then printf $"Patch %s is currently applied\n" \ "$(print_patch $patch)" >&2 - return 1 + return 2 fi echo "$patch" else @@ -598,13 +598,13 @@ find_unapplied_patch() then patch_after "$start" else - find_first_patch || return 1 + find_first_patch || return 2 fi if [ $? -ne 0 ] then printf $"File series fully applied, ends at patch %s\n" \ "$(print_patch $start)" >&2 - return 1 + return 2 fi fi } |