Hi!

It's a bit puzzling what I ran into today.  Please, if someone uses
gpg in Windows,
and there is something else going on here, please respond.  This fix worked for
me, but I find it hard to believe nobody used gpg in Windows.

Attached is a patch against 1.0.5rc tag, it fixes an issue darcs has
when verifying
patches that originate from darcs and gnupg in Windows.   The core of
the issue is
that gnupg generates \r\n at the end of the marker line, and
FastPackedString.linesPS
doesn't remove \r (imo correctly, it works same as Prelude.lines), which in turn
means that External.verifyGPG has wrong condtion to dropWhile.

The error message was rather puzzling, darcs: Prelude.tail: empty
list.  This cannot be
occur again, assuming there aren't more variations to that line,
because we don't end
up checking against it if gpg fails - gpg handles the signed file
without a problem.

Comments are welcome :-)

Good ideas how to add testcase for this are especially welcome. 
Anything short of
storing patchbundle as part of test-case (and probably gpg keyring)
doesn't appear
sensible to me.

Best regards,
--Esa

Attachment: darcs-support-verify-windows-gnupg
Description: Binary data

_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to