quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] [patch 2/5] Return 2 (instead of 1) when there is nothin


From: Martin Quinson
Subject: Re: [Quilt-dev] [patch 2/5] Return 2 (instead of 1) when there is nothing to do
Date: Fri, 18 Jan 2013 15:37:24 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jan 18, 2013 at 09:47:09AM +0100, Jean Delvare wrote:
> Le mercredi 19 décembre 2012 à 15:35 +0100, address@hidden a
> >  [ -z "$opt_verbose" ] && silent_unless_verbose=-s
> >  [ -n "$opt_force" ] && opt_leave_rejects=1
> > --- a/quilt/scripts/patchfns.in
> > +++ b/quilt/scripts/patchfns.in
> > @@ -477,7 +477,7 @@ find_last_patch()
> >             else
> >                     printf $"No series file found\n" >&2
> >             fi
> > -           return 1
> > +           return 2
> >     fi
> >  
> >     echo "$patch"
> 
> This change doesn't have any effect in practice. The only caller of
> find_last_patch() is "quilt mail" and it overwrites the returned value.

This is currently the only caller of find_last_patch. I personally
find dangerous to leave personnal mines in the source code just
because nobody currently runs on it. 

> Plus this would make find_first_patch and find_last_patch diverge for no
> good reason.

Should we possibly fix find_first_patch, then?
 
> I would love if this patch would also add test cases for all conditions
> which are supposed to return 2. This would not only guarantee that such
> a regression isn't reintroduced later, but this would also ensure that
> the fix itself is complete. Unfortunately the testing script doesn't
> support for this yet, but I'm working on it.

Do you mind integrating this even before the test code is working?

> It would also be great to update the manual page to document these
> cases, as it currently lacks an EXIT STATUS section.

Actually, was part of another patch in Debian, as we have a proper
EXIT STATUS section. I just merged both patches, and the result is in
attachment. I know that the patch to the manpage contains an unrelated
change, but this is only a cosmetic improvement so I don't feel like
providing a proper patch. If it really hurts your feeling, I'll commit
this unrelated change myself once you pushed your changes to the tree.

Bye, Mt.

-- 
Le problème, ce n'est pas l'internet. Le problème, c'est l'insécurité
désastreuse de tous ces ordinateurs reliés à l'internet. Il vaudrait
mieux réécrire Windows que TCP/IP. -- Bruce Schneier

Attachment: return2
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]