[RFU] ocaml 3.12.0-4

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Tue Oct 19 19:05:00 GMT 2010


On Tue, 2010-10-19 at 17:18 +0200, Damien Doligez wrote:
> I have one remark about cygport:
> When stripping executables, you grep 'Caml1999X008' to determine if a given
> executable is an OCaml byte-code file.  You should be aware that this magic
> number can get incremented from time to time when the format of byte-code
> changes.  So at the next change it will become 'Caml1999X009' and your
> test will get false negatives and start stripping byte-code executables.

Although FWIW upstream has indicated that this will not change in the
foreseeable future:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#74

> Better yet (but slightly more work), you could use 'tail -c 12' to get
> the last 12 bytes of the file and see if they match
> /Caml1999X[0-9][0-9][0-9]/.  That way, you would be future-proof while
> getting rid of all false positives.  I'm attaching a patch against
> src_postinst.cygpart (cygport version 0.10.0).

Actually, using 'tail -c' instead of 'grep' is a bit faster and avoids
false positives.  I have pushed a slightly modified version of your
patch to cygport master.  Thanks,


Yaakov




More information about the Cygwin-apps mailing list