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

Re: new source package format in dpkg-dev

On Fri, 28 Mar 2008, Robert Luberda wrote:
> I've just did some tests on my 3 quilt-managed source packages
> (whichman, dictd and zapping).


> It seems format 2.0 doesn't work at all for such packages:
> `whichman-2.4.orig.kHu7K8/debian/patches/series' doesn't contain any patch
> patch: **** Only garbage was found in the patch input.
> dpkg-source: failure: patch -s -t -F 0 -N -p1 -u -V never -g0 -b -z
> .dpkg-orig -E gave error exit status 2

This is normal... this format requires all files in debian/patches/ to
be real patches and a quilt managed packages do not respond to that

> Format "3.0 (quilt)" always create a
> debian/patches/debian-changes-*.diff file which reverts any changes made
> by other existing debian/patches files. 

Well, this is normal as well, it's even documented in the man page:
| Note: it’s very important to generate the source package with all
| patches applied, otherwise the generation of the automatic patch will
| lead to a patch that reverts the patches which were not applied.

And usually the "clean" target will unapply the patches before the source
package generation. Thus if you want to switch to the new package format
you have to remove that "feature" and make sure that all patches are
applied when dpkg-source is called.

It's true however that this is a blocker if we want to push this format
as default format without some "explicit opt-in" from the maintainer. But
I'm not sure that this is something realistic anyway.

Maybe we should call "quilt push -a" before building the source package
if we have a series file. But this is going to be a problem if we build
twice in a row and if the first build has added an "automatic" patch
because quilt doesn't know this new patch (it has been created by
dpkg-source without using quilt) and "quilt push -a" will try to re-apply

If anyone knows how to make quilt aware that we have manually applied a patch
and added it in the series file, that would be nice.

> Additionally it gives some warnings for whichman:
> LC_ALL=C dpkg-source --format="3.0 (quilt)" -b whichman-2.4
> dpkg-source: info: using source format `3.0 (quilt)'
> dpkg-source: info: building whichman using existing
> ./whichman_2.4.orig.tar.gz
> dpkg-source: warning: ignoring deletion of file statduplcheck.c
> dpkg-source: warning: ignoring deletion of file statduplcheck.h

This warning is because those files are created by one of the quilt
patch but since that patch is not applied in the source tree used to create the
source package, dpkg-source believes they have been removed (they
are in the temporary tree used for comparison where the quilt patches have been

> ...and fails with the following error for dictd:
> LC_ALL=C dpkg-source --format="3.0 (quilt)" -b dictd-1.10.10.dfsg
> dpkg-source: info: using source format `3.0 (quilt)'
> dpkg-source: info: building dictd using existing
> ./dictd_1.10.10.dfsg.orig.tar.gz
> dpkg-source: error: diff
> `dictd-1.10.10.dfsg.orig.Ly3JcL/debian/patches/colorit-bashisms.patch'
> patches file with no subdirectory
> ... because colorit-bashisms.patch contains:
> Index: dictd/colorit.in
> ===================================================================
> --- colorit.in  2007/09/29 18:57:47     1.7
> +++ colorit.in  2008/02/08 10:59:15     1.8
> @@ -16,7 +16,7 @@

Interesting. dpkg-source is stricter than quilt here apparently. I'll see
if I can enhance its behaviour.

> I've also tried one non-quilt-managed package, and both format 2.0 and
> 3.0 worked as documented on it 
> (2.0 created zz_debian-diff-auto which wasn't automatically applied

What do you mean? It wasn't applied at extraction time?

It's not the expected behaviour and it's also not coherent with what I
$ dpkg-source -x z80dasm_1.1.0-1.dsc
dpkg-source: warning: extracting unsigned source package (z80dasm_1.1.0-1.dsc)
dpkg-source: extracting z80dasm in z80dasm-1.1.0
dpkg-source: info: unpacking z80dasm_1.1.0.orig.tar.gz
dpkg-source: info: unpacking z80dasm_1.1.0-1.debian.tar.gz
dpkg-source: info: applying zz_debian-diff-auto

Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :

Reply to: