quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] issue with quilt push -f


From: Jean Delvare
Subject: Re: [Quilt-dev] issue with quilt push -f
Date: Wed, 03 Dec 2014 10:28:28 +0100

Aristeu, Martin,

Le Tuesday 14 October 2014 à 15:21 +0200, Jean Delvare a écrit :
> Hi Aristeu, Martin,
> (...)
> Le Wednesday 17 September 2014 à 22:38 +0000, Martin Panter a écrit :
> > On 17/09/2014, Aristeu Rozanski <address@hidden> wrote:
> > > The next step, my usual "quilt push -f" didn't quite did the expected,
> > > it just ran patch without -f and patch just thought it was a full revert
> > > based on the first hunk. Now I understand that "quilt push -f -q" will
> > > make quilt use "-f" for patch, but here's the problem: using quilt push
> > > without -q is supposed to be "interactive" except it isn't after the
> > > color output support:
> > > . . .
> > 
> > I found this behaviour annoying when I used to use Quilt a long time
> > ago (possibly even before colour output support?).
> 
> Color support for "quilt push" was added in January 2005:
> http://git.savannah.gnu.org/cgit/quilt.git/commit/?id=ddc509bc766fbde0eb8a5dfe9acb25fbce7b1aaf
> so that's quite ancient. Your patch being dated 23 Sep 2009, I guess you
> wrote it long after color support was added.
> 
> I think I may have been bitten by that bug a few times as well, even
> though I couldn't identify the reason back then. So thanks for
> reporting :-)
> 
> > > 1) could simply use -f for patch always, and have -q still
> > >   useful to supress further messages
> > 
> > Here’s a patch written a few years ago which should do option 1. See
> > <https://github.com/vadmium/quilt/commit/b675543b1c16cb00c8132cfee9c8d40cdae87dbf.patch>
> > in case G Mail screws it up.
> > 
> > From b675543b1c16cb00c8132cfee9c8d40cdae87dbf Mon Sep 17 00:00:00 2001
> > From: Martin Panter <vadmium à gmail·com>
> > Date: Wed, 23 Sep 2009 18:20:30 +1000
> > Subject: [PATCH] =?UTF-8?q?Do=20not=20use=20interactive=20mode=20with=20?=
> >  =?UTF-8?q?=E2=80=9Cquilt=20push=20-f=E2=80=9D?=
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> > 
> > Now the “patch -f” option is always used.
> > ---
> >  quilt/push.in | 10 ++++------
> >  1 file changed, 4 insertions(+), 6 deletions(-)
> > 
> > diff --git a/quilt/push.in b/quilt/push.in
> > index 36e4664..ab8a7dd 100644
> > --- a/quilt/push.in
> > +++ b/quilt/push.in
> > @@ -36,8 +36,7 @@ be used.
> > 
> >  -q Quiet operation.
> > 
> > --f Force apply, even if the patch has rejects. Unless in quiet mode,
> > - apply the patch interactively: the patch utility may ask questions.
> > +-f Force apply, even if the patch has rejects.
> > 
> >  -v Verbose operation.
> > 
> > @@ -115,19 +114,19 @@ apply_patch()
> >   | patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \
> >   --backup --prefix="$QUILT_PC/$patch/" \
> >   $no_reject_files \
> > - -E $silent $force_apply 2>&1
> > + -E $silent -f 2>&1
> >   elif [ "${patch_file:(-4)}" = ".bz2" ]
> >   then
> >   bzip2 -cd $patch_file \
> >   | patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \
> >   --backup --prefix="$QUILT_PC/$patch/" \
> >   $no_reject_files \
> > - -E $silent $force_apply 2>&1
> > + -E $silent -f 2>&1
> >   else
> >   patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \
> >        --backup --prefix="$QUILT_PC/$patch/" \
> >        $no_reject_files \
> > -      -E $silent $force_apply -i $patch_file 2>&1
> > +      -E $silent -f -i $patch_file 2>&1
> >   fi
> >  }
> > 
> > @@ -337,7 +336,6 @@ stop_at_patch=$(find_unapplied_patch
> > "$stop_at_patch") || exit 1
> > 
> >  [ -n "$opt_quiet" ] && silent=-s
> >  [ -z "$opt_verbose" ] && silent_unless_verbose=-s
> > -[ -z "$opt_force" -o -n "$opt_quiet" ] && force_apply=-f
> >  [ -n "$opt_force" ] && opt_leave_rejects=1
> > 
> >  top=$(top_patch)
> 
> Unfortunately, this patch no longer applies. The code you're touching
> was heavily modified 5 years ago:
> http://git.savannah.gnu.org/cgit/quilt.git/commit/?id=031ed72041ce45e2e63b870644b2dfa9e084a15b
> 
> Maybe you should consider rebasing your version of quilt on v0.63 or
> even the master branch ;-)
> 
> Applying something like your patch would mean that there no longer is a
> way to apply patches interactively. But well, as you demonstrated, there
> hasn't been a way to actually do that since January 2005 and I can't
> remember hearing any complaint about that, so I suppose this is
> acceptable.
> (...)
> For now I would go with option #1, for the reason that it's the most
> simple one and it sticks to (and finally documents) the way quilt has
> worked for the past 9 years. Anyone who needs more will have to come up
> with the code required to make it fly.
> 
> Martin, Aristeu, can any of you please submit a patch implementing
> option #1 that properly applies on top of the most recent version of
> quilt? Thanks.

I would like to get this fixed now as I just hit the bug once again and
it pissed me off. Do you have an updated patch ready, or should I do it
myself?

Thanks,
-- 
Jean Delvare
SUSE L3 Support




reply via email to

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