systools.make_tar can't find .app files in the .ez archive

457 views Asked by At

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.

1

There are 1 answers

2
chops On

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.