1

I am creating a release with reltool. The output folder rel/lib contains all the applications with their ebin folders packed into .ez archives, e.g. for crypto:

crypto-2.2
crypto-2.2/priv/ (with some files in the priv folder)
crypto-2.2.ez
crypto-2.2.ez/crypto-2.2/ebin/crypto.app
crypto-2.2.ez/crypto-2.2/ebin/ (with some .beam files in the ebin folder)

I start erl in the rel folder. The path to the ebin folder is in the code path, i.e. code:get_path(). returns amongst other (and similarly for other apps in the lib folder):

"/usr/home/g/work/project/rel/lib/crypto-2.2.ez/crypto-2.2/ebin"

But yet when trying to call systools:make_tar("releases/0.1/project"). it complains that it can't find the .app files (for all the apps mentioned in the release):

crypto: File not found: "crypto.app"

I see the .app file is in the archive, it's only that systools can't see it because of some reason. I tried to specify the ebin folder when calling make_tar using the path option but it doesn't seem to be working (the same error that crypto.app is missing). Also:

file:consult("/usr/home/g/work/project/rel/lib/crypto-2.2.ez/crypto-2.2/ebin/crypto.app").

gives me: {error,enotdir}.

Maybe systools doesn't handle archives yet? Is there any other way of creating the tar archive from a release made with reltool? Any help would be greatly appreciated.

Greg
  • 8,230
  • 5
  • 38
  • 53

1 Answers1

0

You could avoid this altogether by also excluding the ebin directory from the .ez files by adding the following to your reltool.config

{excl_archive_filters, ["^include$","^priv$","^ebin$"]}

In most cases, this will basically mean disabling the creation of the majority of the .ez files, but the release should still work just fine.

chops
  • 2,572
  • 1
  • 16
  • 25
  • Thanks, I know that. But that would mean disabling .ez archives altogether (as currently only ebin goes there). So, instead of disabling the feature I would rather find a way of making it working, or hear from someone that indeed in some old modules accessing files inside .ez archives don't work. But in a way it is a workaround for the problem. Just not what I am (ideally) looking for. BTW another workaround would be unpacking all .ez archives and running systools then, but again, it still doesn't seem like the right solution. – Greg Feb 23 '13 at 18:53
  • Understood. I don't know a solution then. I don't remember the exact reasons I stopped using .ez files, but I ran into enough complications that I decided it wasn't work the hassle. If you haven't asked the Erlang mailing list, I'd recommend giving that a shot. – chops Feb 24 '13 at 01:20