简体   繁体   中英

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

I am creating a release with reltool . The output folder rel/lib contains all the applications with their ebin folders packed into .ez archives, eg 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, ie 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM