Am 03.06.10 13:03, schrieb Thomas Keller:
> Am 31.05.2010 01:01, schrieb Thomas Keller: 
>> 200 diff_patch_drop                              FAIL (line 29)
> 
> Apparently the BSD version of patch does not drop files - can we make a
> guard for that in the test?

I've found the man page for patch on openBSD
(http://www.openbsd.org/cgi-bin/man.cgi?query=patch) and it contains no
mention of special handling of the source / target path "/dev/null".
Also, the explanation of the -E (--remove-empty-files) option tells
nothing about the automatic removal of empty files, so I guess openBSD's
patch always needs an explicit -E given to do what patch does
automatically on other platforms. Even if it would do what it should, if
the environment variable "POSIXLY_CORRECT" is found, it acts as if it
would be argumented with --posix, which makes it leave empty files alone
again.

So, what should we do here? The addition of -E for all other unices
would mean that we'd tamper the test. We check there whether the diff
input is so well-formed that a "normal" unix patch would act correctly
and remove the file if it is empty. If we would always give -E, patch
would remove it every time (as long as it is empty), even if it does not
have the correct header (change a test diff to use /dev/nul instead of
/dev/nul, f.e., to see the effect - the file is no longer removed on
"compliant" systems).

Do we care enough to skip this test altogether on freebsd and openbsd or
should we just parametricize patch with -E only on these platforms?

Thomas.

-- 
GPG-Key 0x160D1092 | tommyd3...@jabber.ccc.de | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to