[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] [PATCH] give more meaningful error messages
From: |
Jean Delvare |
Subject: |
Re: [Quilt-dev] [PATCH] give more meaningful error messages |
Date: |
Mon, 25 Jan 2010 10:36:54 +0100 |
User-agent: |
KMail/1.9.1 |
Hi David,
Le vendredi 4 décembre 2009 12:18, David Paleino a écrit :
> Differentiate output when $QUILT_PATCHES/series is not found from
> when $QUILT_PATCHES/series is empty.
> This has originally been reported as
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557621
>
> ---
> quilt/scripts/patchfns.in | 26 ++++++++++++++++++++++----
> 1 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
> index 9ed4fd1..bfb689f 100644
> --- a/quilt/scripts/patchfns.in
> +++ b/quilt/scripts/patchfns.in
> @@ -488,10 +488,19 @@ remove_from_db()
>
> find_first_patch()
> {
> - local patch=$(cat_series | head -n 1)
> + local series retval patch
> + series=$(cat_series)
> + retval=$?
> + patch=$(echo $series | head -n 1)
> +
> if [ -z "$patch" ]
> then
> - printf $"No patches in series\n" >&2
> + if [ $retval -eq 1 ]
> + then
> + printf $"No series file found\n" >&2
> + else
> + printf $"No patches in series\n" >&2
> + fi
> return 1
> fi
>
> @@ -500,10 +509,19 @@ find_first_patch()
>
> find_last_patch()
> {
> - local patch=$(cat_series | tail -n 1)
> + local series retval patch
> + series=$(cat_series)
> + retval=$?
> + patch=$(echo $series | tail -n 1)
> +
> if [ -z "$patch" ]
> then
> - printf $"No patches in series\n" >&2
> + if [ $retval -eq 1 ]
> + then
> + printf $"No series file found\n" >&2
> + else
> + printf $"No patches in series\n" >&2
> + fi
> return 1
> fi
>
What is the purpose of this change? What is the user going to do
differently after that?
For quilt, an empty series file and a non-existent series file are
essentially the same: the series file is created on-the-fly the first
time it is needed. So I suspect that the lack of difference in error
messages is on purpose.
--
Jean Delvare
Suse L3