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

Re: Behaviour of dpkg-source with "3.0 (quilt)" and VCS and automatic patches

On Fri, 15 Jul 2011, Steve Langasek wrote:
> On Sun, May 29, 2011 at 10:53:03AM +0200, Raphael Hertzog wrote:
> > b/ modify dpkg-source --before-build to keep a trace of the fact that
> >    it applied the patches (for example by creating
> >    .pc/dpkg-source-auto-applied) and in that case have dpkg-source
> >    --after-build unapply the patches so that we're back to a clean
> >    state after a succesful build.
> >    If the build fails, we'd keep the patches applied.
> That sounds perfectly reasonable to me.

FWIW, this is already implemented in git master.

> > But it still happens that those patches are generated[1] when the maintainer
> > did not expect any change at all. That's why we added the option
> > --abort-on-upstream-changes for maintainers who never wants dpkg-source
> > to auto-create a patch.
> For me, what's most annoying here is the use of the version number in the
> patch name.  This means, for instance, that if the clean target modifies the
> contents (maybe by regenerating configure), each package version could
> create a *new* patch for something that should definitely be represented as
> part of a single patch.

If the clean target does something like this, you obviously want to add
the modified files to the ignore list with something like this
in debian/source/options:
extend-diff-ignore (^|/)configure$

The use of the version number was supposed to differentiate changes made
in each upload for example by successive NMUers.

Anyway, I have implemented my suggested change in a topic branch:
git clone git://anonscm.debian.org/users/hertzog/dpkg.git -b pu/master

It now fails and suggests to call dpkg-source --record-changes to make
the changes permanent.

I would welcome some people trying it. Cf my message of yesterday to
debian-dpkg: http://lists.debian.org/debian-dpkg/2011/07/msg00021.html

> I'm inclined to think that --single-debian-patch is a more directly useful
> default (possibly without --abort-on-upstream-changes).  It doesn't give the
> best results for patch naming and headers, but if the maintainer is actually
> going to put in the effort to do all that, I would assume they can change
> the default anyway.

--single-debian-patch has a really specific purpose of someone wanting
to always auto-generate the full patch because the changes are managed in
a VCS and not in quilt. 

I don't agree that it should be the default. That said the naming of the
automatic patch is less important if the default is to go through 
dpkg-source --record-changes since it requires the user to give a
meaninful patch name.

We could simplify everything and drop --single-debian-patch (just making
it an alias for the new --auto-record-changes) by always using a
non-versioned name.

Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)

Reply to: