Guido Günther writes ("Re: Bug#841866: Cannot import some patch queues"):
> control: forecmerge 825537 -1
...
> I've stepped onto this already, just did not get around to investigate
> what fails in git-apply yet. Thanks for bringing this to the attention
> of the git maintainers!

Great.  Thanks for your attention.

There is now a trivial test case in the dgit test suite that
reproduces the problem.  `dgit clone dgit sid', and then look at
dgit/tests/pkg-srcs/example_1.0-1+absurd.dsc (and associated files).
You may find this more manageable than using the glibc source :-).

You'll see from my mail to #841866 that I have deployed a horrible
workaround.  I think I need to keep that workaround in dgit because I
want dgit 2.x to be usefully backportable.

But you might want to consider whether this workaround (falling back
to dpkg-source --before-build) is something you would like to do in
gbp.

If you did this in gbp pq, you could get rid of the whitespace-related
fallback, and simply fall back to dpkg-source for each patch that
git-apply didn't like.  dpkg-source is slower but if you only use it
for occasional patches, that's probably tolerable.

You would just need to do, in gbp, this bit of my absurd git wrapper:

+pwd=`pwd`
+patch=${patch#$pwd/debian/patches/}
+printf "%s\n" "$patch" >debian/patches/series
+
+dpkg-source --before-build .
+
+rm -rf .pc
+git checkout debian/patches/series
+git add -Af .

If you implement this in gbp then I will be able to eventually drop
the craziness from dgit.  If you don't then I think I need to retain
it, because I don't believe that this is the last kind of situation we
will find where dpkg-source can apply things but git-apply can't.

Even scanning the archive for current instances is no use, because
dpkg-source does no useful checking on quilt patches to check that
they only use features that dpkg-source is happy with.  (In contrast
to the code I wrote for format 1.0-with-diff.)  So derivatives and
future versions of Debian might contain novel excitement, and none of
the non-gitish tools would notice or complain.

I do worry slightly about the fact that there can be patches that both
git-apply and dpkg-source can cope with but which produce different
trees.  An example right now would be a new file with a non-default
mode.

Ian.

-- 
Ian Jackson <ijack...@chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply via email to