Behaviour of make:files vs. erlc and patch
Sam Bobroff
sam@REDACTED
Wed May 19 01:01:47 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi everyone,
I have sometimes had a problem with make:files failing mysteriously with
'error' and no message. Running erlc from the command line on the same
files works successfully and I think I've tracked the issue to an
unnecessary check in make:files that fails because the target .beam file
exists but is owned by root.
I have created a simple patch for this and I humbly present it for
review. It's my first one so I hope it's OK! Here's the commit message:
- ------
Change make:files to behave more like erlc
Currently make:files will fail with the atom 'error' and
no message when the input (.erl) file is unreadable or the
output (.beam) file is unwritable. This differs from erlc
which will print a useful error message, or when possible,
remove the unwritable output file and continue successfully.
This change removes an the unnecessary checks on the files when
make:files is called and allows the error checking to be
done in compile:file, where the error messages are produced.
It does not effect the return value.
In particular this resolves the mysterious problem of make:files
failing but erlc succeeding, caused by an unwritable (usually
root owned) beam file in an otherwise writable build directory.
- ------
The patch location is:
git fetch git://github.com/firx/otp.git make_files_like_erlc
Cheers,
Sam.
- --
Sam Bobroff | sam@REDACTED | M5 Networks
Why does my email have those funny headers? Because I use PGP to sign
my email (and you should too!): that's how you know it's really from me.
See: http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvzHFsACgkQm97/UHSa/ARwZgCdFE2AAg7AY+d0rXMSHRdAJvhx
8EEAn3heGIEw/bJxmvTowxvWbP1gV3jm
=FJfG
-----END PGP SIGNATURE-----
More information about the erlang-patches
mailing list