Bug #625789: dpkg-source: --extend-diff-ignore doesn't work as expected
Gilles Filippini a écrit , Le -10/01/-28163 20:59:
> Trying not to include .gitignore into my source package using a
> debian/source/local-options file with:
> extend-diff-ignore = '.gitignore'
>
> It doesn't work:
> $ DIST=sid git-buildpackage --git-builder="git-pbuilder" --git-ignore-new
> (...)
> dpkg-source -i(?:^|/).git(attributes)?(?:$|/.*$) -I.git -b xf86-video-glamo-0.0.0+20100630.git16af3c00
> dpkg-source: info: using options from xf86-video-glamo-0.0.0+20100630.git16af3c00/debian/source/local-options: --extend-diff-ignore=.gitignore
> dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
> dpkg-source: info: using source format `1.0'
> dpkg-source: info: building xf86-video-glamo using existing xf86-video-glamo_0.0.0+20100630.git16af3c00.orig.tar.gz
> dpkg-source: info: building xf86-video-glamo in xf86-video-glamo_0.0.0+20100630.git16af3c00-3.diff.gz
> dpkg-source: warning: the diff modifies the following upstream files:
> .gitignore
> dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
> dpkg-source: info: building xf86-video-glamo in xf86-video-glamo_0.0.0+20100630.git16af3c00-3.dsc
> dpkg-genchanges -S >../xf86-video-glamo_0.0.0+20100630.git16af3c00-3_source.changes
>
> It doesn't work from the command line either:
> $ rm xf86-video-glamo-0.0.0+20100630.git16af3c00/debian/source/local-options
> $ dpkg-source -i'(?:^|/).git(attributes)?(?:$|/.*$)' --extend-diff-ignore='.gitignore' -I.git -b xf86-video-glamo-0.0.0+20100630.git16af3c00/
> dpkg-source: avertissement: aucun format source indiqué dans debian/source/format, voir dpkg-source(1)
> dpkg-source: info: utilisation du format source « 1.0 »
> dpkg-source: info: construction de xf86-video-glamo à partir de xf86-video-glamo_0.0.0+20100630.git16af3c00.orig.tar.gz
> dpkg-source: info: construction de xf86-video-glamo dans xf86-video-glamo_0.0.0+20100630.git16af3c00-3.diff.gz
> dpkg-source: avertissement: le fichier de différences modifie les fichiers amont suivants :
> .gitignore
> dpkg-source: info: choisissez le format « 3.0 (quilt) » pour utiliser des modifications séparées et documentées dans les sources amont, voir dpkg-source(1)
> dpkg-source: info: construction de xf86-video-glamo dans xf86-video-glamo_0.0.0+20100630.git16af3c00-3.dsc
>
> But forcing everything into one diff-ignore regex does work:
> $ dpkg-source -i'(?:^|/).git(attributes)?(?:$|/.*$)|.gitignore' -I.git -b xf86-video-glamo-0.0.0+20100630.git16af3c00/
> dpkg-source: avertissement: aucun format source indiqué dans debian/source/format, voir dpkg-source(1)
> dpkg-source: info: utilisation du format source « 1.0 »
> dpkg-source: info: construction de xf86-video-glamo à partir de xf86-video-glamo_0.0.0+20100630.git16af3c00.orig.tar.gz
> dpkg-source: info: construction de xf86-video-glamo dans xf86-video-glamo_0.0.0+20100630.git16af3c00-3.diff.gz
> dpkg-source: info: construction de xf86-video-glamo dans xf86-video-glamo_0.0.0+20100630.git16af3c00-3.dsc
The attached patch appears to solve my problem, with
--extend-diff-ignore specified either from the command line or from a
debian/source/[local-]options file.
Rationals are:
* options from the command line should be interpreted first
* then should come options from debian/source/options
* and finally options from debian/source/local-options
* --extend-diff-ignore should actually extend diff-ignore instead of the
default diff-ignore regex.