FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 03-06-2009, 05:07 AM
Ben Finney
 
Default Prefix level in Quilt patches

Paul Wise <pabs@debian.org> writes:

> On Fri, Mar 6, 2009 at 10:12 AM, Ben Finney <ben+debian@benfinney.id.au> wrote:
>
> > How can I reliably inform the Debian packaging tools that my quilt
> > patches are in ‘patch -p0’ format?
>
> You don't want to use -p0 otherwise you'll get bugs from buxy about
> not supporting dpkg source package v3.

Hmm. Why does buzy have this behaviour? My first impression is that,
if buxy can't handle a ‘-p0’ patch, that's a bug.

> If you actually want -p0 for some weird reason

As mentioned, the reason is that's what is most easily output from my
VCS's ‘diff’ command which I'm using to generate the patch files.

> make sure the series file has that option in it:
>
> $ locate debian/patches/series | xargs grep -- -p0
> ...
> /home/pabs/devel/debian/games/gravitation/debian/patches/series:abs_path.patch
> -p0
> /home/pabs/devel/debian/games/passage/debian/patches/series:abs_path.patch -p0
> /home/pabs/devel/debian/games/passage/debian/patches/series:amd64_fix.patch -p0
> ...

Thank you. I didn't see this mentioned clearly in the Quilt
documentation.

--
“Are you pondering what I'm pondering?” “I think so, Brain, but |
` pants with horizontal stripes make me look chubby.” —_Pinky and |
_o__) The Brain_ |
Ben Finney


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 05:48 AM
Paul Wise
 
Default Prefix level in Quilt patches

On Fri, Mar 6, 2009 at 3:07 PM, Ben Finney <ben+debian@benfinney.id.au> wrote:
> Paul Wise <pabs@debian.org> writes:
>
>> On Fri, Mar 6, 2009 at 10:12 AM, Ben Finney <ben+debian@benfinney.id.au> wrote:
>>
>> > How can I reliably inform the Debian packaging tools that my quilt
>> > patches are in ‘patch -p0’ format?
>>
>> You don't want to use -p0 otherwise you'll get bugs from buxy about
>> not supporting dpkg source package v3.
>
> Hmm. Why does buzy have this behaviour? My first impression is that,
> if buxy can't handle a ‘-p0’ patch, that's a bug.

buxy (Raphael Hertzog) has pushed dpkg-source 3.0 (quilt) source
packages into lenny dpkg and understandably wants us to switch to it
for squeeze:

http://lists.debian.org/debian-devel/2009/03/msg00348.html

The reason you cannot use -p0 with dpkg-source 3.0 (quilt) source
packages is because dpkg-source ignores options in the series file and
expects patches were generated with -p1 or -pab, a quote from the
dpkg-source manual page:

Note however that while dpkg-source parses correctly series files with
explicit options used for patch application (stored on each line after
the patch filename and one or more spaces), it does ignore those
options and always expect patches that can be applied with the -p1
option of patch. It will thus emit a warning when it encounters such
options, and the build is likely to fail.

buxy has been filing bugs on packages that fail to build as a result
of using patches generated using -p0.

--
bye,
pabs

http://wiki.debian.org/PaulWise


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 06:13 AM
Ben Finney
 
Default Prefix level in Quilt patches

Paul Wise <pabs@debian.org> writes:

> On Fri, Mar 6, 2009 at 3:07 PM, Ben Finney <ben+debian@benfinney.id.au> wrote:
> > My first impression is that, if buxy can't handle a ‘-p0’ patch,
> > that's a bug.

My apologies, I thought ‘buxy’ was perhaps the name of some service on
the Debian project infrastructure.

> The reason you cannot use -p0 with dpkg-source 3.0 (quilt) source
> packages is because dpkg-source ignores options in the series file
> and expects patches were generated with -p1 or -pab, a quote from
> the dpkg-source manual page:
>
> Note however that while dpkg-source parses correctly series files
> with explicit options used for patch application (stored on each
> line after the patch filename and one or more spaces), it does
> ignore those options and always expect patches that can be applied
> with the -p1 option of patch. It will thus emit a warning when it
> encounters such options, and the build is likely to fail.

The question remains: If this is the behaviour of ‘dpkg-source’, I
consider it a bug. What is the reason for this explicit behaviour?

--
“And if I laugh at any mortal thing, / 'Tis that I may not |
` weep.” —“Lord” George Gordon Noel Byron, _Don Juan_ |
_o__) |
Ben Finney


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 07:10 AM
Raphael Hertzog
 
Default Prefix level in Quilt patches

On Fri, 06 Mar 2009, Ben Finney wrote:
> > Note however that while dpkg-source parses correctly series files
> > with explicit options used for patch application (stored on each
> > line after the patch filename and one or more spaces), it does
> > ignore those options and always expect patches that can be applied
> > with the -p1 option of patch. It will thus emit a warning when it
> > encounters such options, and the build is likely to fail.
>
> The question remains: If this is the behaviour of ‘dpkg-source’, I
> consider it a bug. What is the reason for this explicit behaviour?

Supporting multiple -pX would increase the complexity of the
associated code in a manner that is mostly incompatible with the
various checks that have always been built into dpkg-source (and
that were only applied on .diff). It's enough error-prone to mimick
the patch heuristics to identify the file to patch that I did not
want to have to support multiple -pX.

Furthermore, I believe that consistency is important and that we're
better with all patches formatted in the same way. Quilt make it
easy to refresh any patch to the expected format with "quilt refresh -p1"
(or -pab).

Last point, IIRC, quilt/patch are able to handle patches really formatted
with -p1 but announced with -p0 (in the series file). I didn't want to have
to deal with such cornercases. Yet dpkg-source has to be able to tell
which files have been patched and it must be able to check if they exist,
and so on.

Feel free to try to write a patch to see the problems by yourself.

Cheers,
--
Raphaël Hertzog

Contribuez * Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 07:26 AM
Ben Finney
 
Default Prefix level in Quilt patches

Raphael Hertzog <hertzog@debian.org> writes:

> Supporting multiple -pX would increase the complexity of the
> associated code in a manner that is mostly incompatible with the
> various checks that have always been built into dpkg-source (and
> that were only applied on .diff). It's enough error-prone to mimick
> the patch heuristics to identify the file to patch that I did not
> want to have to support multiple -pX.

According to the Quilt documentation, the only levels that need to be
accounted for are ‘-p0’ and ‘-p1’. That's more complexity, but at
least it's not unbounded.

> Furthermore, I believe that consistency is important and that we're
> better with all patches formatted in the same way. Quilt make it
> easy to refresh any patch to the expected format with "quilt refresh
> -p1" (or -pab).

I'm a complete neophyte at Quilt, and am using it only to apply
patches that I've already created elsewhere. Can I expect ‘quilt
refresh -p1’ to work if the patches were not created with Quilt?

> Last point, IIRC, quilt/patch are able to handle patches really
> formatted with -p1 but announced with -p0 (in the series file). I
> didn't want to have to deal with such cornercases. Yet dpkg-source
> has to be able to tell which files have been patched and it must be
> able to check if they exist, and so on.

I don't know enough about the situation you describe to understand,
but I appreciate that a corner case like that sounds painful.

> Feel free to try to write a patch to see the problems by yourself.

I'm writing patches and trying to use them with ‘dpkg-source’, that's
why I began this thread.

--
“I can picture in my mind a world without war, a world without |
` hate. And I can picture us attacking that world, because they'd |
_o__) never expect it.” —Jack Handey |
Ben Finney


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 07:41 AM
Raphael Hertzog
 
Default Prefix level in Quilt patches

On Fri, 06 Mar 2009, Ben Finney wrote:
> > Furthermore, I believe that consistency is important and that we're
> > better with all patches formatted in the same way. Quilt make it
> > easy to refresh any patch to the expected format with "quilt refresh
> > -p1" (or -pab).
>
> I'm a complete neophyte at Quilt, and am using it only to apply
> patches that I've already created elsewhere. Can I expect ‘quilt
> refresh -p1’ to work if the patches were not created with Quilt?

Yes.

> > Feel free to try to write a patch to see the problems by yourself.
>
> I'm writing patches and trying to use them with ‘dpkg-source’, that's
> why I began this thread.

I meant "a patch for dpkg-source that would add support of -p0".

Cheers,
--
Raphaël Hertzog

Contribuez * Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 07:48 AM
Ben Finney
 
Default Prefix level in Quilt patches

Ben Finney <ben+debian@benfinney.id.au> writes:

> Raphael Hertzog <hertzog@debian.org> writes:
>
> > Quilt make it easy to refresh any patch to the expected format
> > with "quilt refresh -p1" (or -pab).
>
> I'm a complete neophyte at Quilt, and am using it only to apply
> patches that I've already created elsewhere. Can I expect ‘quilt
> refresh -p1’ to work if the patches were not created with Quilt?

More specifically, I'm not the one using Quilt *at all*. The patches
are created from my VCS, stored in the ‘debian/patches/’ directory
separate from the upstream source, so there isn't anything for them to
be applied to until the package gets built with ‘dpkg-source’.

A brief expreiment with ‘quilt refresh’ shows that it needs me to have
the working tree available, just in order to (from my point of view)
fiddle with the ‘-pN’ level. So AFAICT it doesn't work for my use
case.

--
“Theology is the effort to explain the unknowable in terms of |
` the not worth knowing.” —Henry L. Mencken |
_o__) |
Ben Finney


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 07:59 AM
Raphael Hertzog
 
Default Prefix level in Quilt patches

On Fri, 06 Mar 2009, Ben Finney wrote:
> More specifically, I'm not the one using Quilt *at all*. The patches
> are created from my VCS, stored in the ‘debian/patches/’ directory
> separate from the upstream source, so there isn't anything for them to
> be applied to until the package gets built with ‘dpkg-source’.

Most VCS have options to control the output of "<vcs> diff". git produces
-p1 patches by default and you can use --no-prefix (-p0 like) or
--src-prefix / --dst-prefix for other cases.

With bzr you can use “bzr diff --prefix a/:b/” to produce -p1 patches
instead of -p0 patches.

Cheers,
--
Raphaël Hertzog

Contribuez * Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 08:15 AM
Ben Finney
 
Default Prefix level in Quilt patches

Raphael Hertzog <hertzog@debian.org> writes:

> On Fri, 06 Mar 2009, Ben Finney wrote:
> > More specifically, I'm not the one using Quilt *at all*. The patches
> > are created from my VCS, stored in the ‘debian/patches/’ directory
> > separate from the upstream source, so there isn't anything for them to
> > be applied to until the package gets built with ‘dpkg-source’.
>
> Most VCS have options to control the output of "<vcs> diff". git
> produces -p1 patches by default and you can use --no-prefix (-p0
> like) or --src-prefix / --dst-prefix for other cases.
>
> With bzr you can use “bzr diff --prefix a/:b/” to produce -p1
> patches instead of -p0 patches.

Yes, that could be done. It needs to be done by every user, for every
patch that they ever create for consumption with ‘dpkg-source’. Which
is why I was hoping for a way to fix it in one place, for
‘dpkg-source’ specifically.

I wonder whether the fall-out from all those people producing valid
Quilt patches that don't work with ‘dpkg-source’, and having to
educate each new person indefinitely, is going to be better or worse
than, one time, fixing ‘dpkg-source’ to accept ‘-p0’ patches :-)

--
“Pinky, are you pondering what I'm pondering?” “I think so, |
` Brain, but isn't that why they invented tube socks?” —_Pinky |
_o__) and The Brain_ |
Ben Finney


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 08:30 AM
Raphael Hertzog
 
Default Prefix level in Quilt patches

On Fri, 06 Mar 2009, Ben Finney wrote:
> Raphael Hertzog <hertzog@debian.org> writes:
>
> > On Fri, 06 Mar 2009, Ben Finney wrote:
> > > More specifically, I'm not the one using Quilt *at all*. The patches
> > > are created from my VCS, stored in the ‘debian/patches/’ directory
> > > separate from the upstream source, so there isn't anything for them to
> > > be applied to until the package gets built with ‘dpkg-source’.
> >
> > Most VCS have options to control the output of "<vcs> diff". git
> > produces -p1 patches by default and you can use --no-prefix (-p0
> > like) or --src-prefix / --dst-prefix for other cases.
> >
> > With bzr you can use “bzr diff --prefix a/:b/” to produce -p1
> > patches instead of -p0 patches.
>
> Yes, that could be done. It needs to be done by every user, for every
> patch that they ever create for consumption with ‘dpkg-source’. Which
> is why I was hoping for a way to fix it in one place, for
> ‘dpkg-source’ specifically.

quilt assumes -p1 by default too, using -p0 requires you to explicitely
add -p0 in the series file. So in the end, you have to teach some tool at
some place of the desired/actual format.

Also in the end, I expect tools like *-buildpackage to hide you those
details, you just maintain your topic branches and you're done. They take
care of generating the patches for you.

Cheers,
--
Raphaël Hertzog

Contribuez * Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org