[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] quilt new -p ab
From: |
Andreas Grünbacher |
Subject: |
Re: [Quilt-dev] quilt new -p ab |
Date: |
Mon, 30 Aug 2021 15:14:45 +0200 |
Am Mo., 30. Aug. 2021 um 14:50 Uhr schrieb Jean Delvare <jdelvare@suse.de>:
> On Mon, 30 Aug 2021 14:26:23 +0200, Egbert Eich wrote:
> > Jean Delvare writes:
> > > This all originates from this 12-year-old commit:
> > >
> > > commit 66f9da46333e3d268cd1dd429ff2d2a674450d80
> > > Author: Andreas Gruenbacher
> > > Date: Wed Nov 25 18:38:10 2009 +0100
> > >
> > > - new command: Add -p ... option (equivalent to diff -p ...).
> > > (Based on a patch from Egbert Eich.)
> > >
> > > Apparently this was only ever tested with "-p0" and not with "-p ab"?
> >
> > This is not unlikely. When I sent these patches to Andreas, I was
> > addressing issues I had with RPM packages, and RPMs do not support
> > the -p ab option with %patch. So I may have never looked into '-p ab'.
>
> That was my guess, thanks for confirming.
>
> > > This brings the question as to whether we actually want to support
> > > option "-p ab" in the "new" command and in the series file.
> > >
> > > My initial feeling is that we shouldn't, as the options in the series
> > > file are meant to be passed to patch(1), so we should only store "-p0"
> > > and "-R" there. Thus one way to fix the bugs is to simply remove the
> > > support of "-p ab" from the "new" command.
> >
> > I believe my intention was to support also 'higher' levels than 0 or 1.
> > 'diff' also supports -p ab - at least according to the man page.
>
> Hmm? -p means something completely different for diff (--show-c-function).
Yes, quilt uses 'diff --label "a/$file" --label "b/$file"' for
generating the '-p ab' format.
The setup command may put a strip level greater than one into the
series file and 'quilt push' will happily apply such patches, but the
refresh command will complain when trying to refresh a patch with a
strip level greater than one, for example:
Cannot refresh patches with -p2, please specify -p0, -p1, or -pab instead
Andreas