This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [RFU] ocaml 3.12.0-4
- From: "Yaakov (Cygwin/X)" <yselkowitz at users dot sourceforge dot net>
- To: cygwin-apps <cygwin-apps at cygwin dot com>
- Date: Tue, 19 Oct 2010 14:05:01 -0500
- Subject: Re: [RFU] ocaml 3.12.0-4
- References: <113A90AF-B2B9-4A12-BB31-D624FE618D87@inria.fr> <4C84FE0E.8010502@cwilson.fastmail.fm> <FEB476C6-B97B-47F6-A4C3-15862A0D947A@inria.fr> <20100908080047.GA5376@calimero.vinschen.de> <70862E73-0DD8-46EA-912D-2AB952436FC6@inria.fr> <20100908093147.GC5609@calimero.vinschen.de> <70B0B7DB-C46A-40B9-8A02-F028FE1CECB5@inria.fr> <1284351158.7048.3.camel@YAAKOV04> <30277F3C-C2A0-4416-BC07-0DAC07671D11@inria.fr> <2136693504.31868.1286546092871.JavaMail.root@zmbs1.inria.fr> <480D4C2A-4EBC-476F-9EF8-6D2E1E955180@inria.fr> <1695720864.104720.1287162844399.JavaMail.root@zmbs1.inria.fr> <F4EBDD49-8FC2-4206-8525-B105A6A704D5@inria.fr>
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