Executables seem to stack/repeat witch each pack (IzPack 5.0.6)

91 views
Skip to first unread message

Stefan Murawski

unread,
Dec 8, 2015, 7:48:16 AM12/8/15
to izpack-user
Something curious I am analyzing right now with IzPack 5.0.6.

I have several Packs 
The first Pack has 2 Executables (config-postinstall.bat and config-postinstall.sh).
    <executable                targetfile="$INSTALL_PATH/admin/bin/config_postinstall.sh"                failure="warn" stage="postinstall">

      <os family="unix"/>

    </executable>

    <executable                targetfile="$INSTALL_PATH/admin/bin/config_postinstall.bat"                failure="warn" stage="postinstall">

      <os family="windows"/>

    </executable>

The next Pack has 2 Executables (postinstall.bat and postinstall.sh)

    <executable targetfile="$INSTALL_PATH/postinstall.sh" failure="warn" stage="postinstall">

      <os family="unix"/>

    </executable>

    <executable targetfile="$INSTALL_PATH/postinstall.bat" failure="warn" stage="postinstall">

      <os family="windows"/>

    </executable>

When the first pack is executed the config-postinstall file is executed and deleted.
Fein: Found 2 executable files

But the next pack in the execution order has the executables from the first pack again and therefore the build failes (file not found).

Fein: Found 4 executable files (but this pack also has only 2 executables)


com.izforge.izpack.api.exception.IzPackException: Ein Fehler ist aufgetreten
in java.lang.Thread.run() at Thread.java:744
in com.izforge.izpack.installer.unpacker.UnpackerBase.run() at UnpackerBase.java:235
in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:275
Caused by: com.izforge.izpack.api.exception.InstallerException: File execution failed
in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:253
in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:439
in com.izforge.izpack.installer.unpacker.UnpackerBase.executeFiles() at UnpackerBase.java:934

I think this error was not present in 5.0.3 (but not sure, yet)

A workaround is setting keep="true", but I don't want this.


debug.out

Stefan Murawski

unread,
Dec 8, 2015, 8:20:11 AM12/8/15
to izpack-user
The installer works as expected in 5.0.3

If I don't abort the installation I have:

 Found 20 executable files at the end and lots of dialogs to close :)

Stefan Murawski

unread,
Dec 8, 2015, 9:21:40 AM12/8/15
to izpack-user
I found the culprit.
In an internally changed Version of 5.0.3 the UnpackerBase class was patched.
At each pack-iteration the List of <executables>, etc was cleared.
Before that the lists grew with each pack.

René Krell

unread,
Dec 10, 2015, 5:42:35 AM12/10/15
to izpack-user
Oh, good. Worth to report an issue, ideally with a pull request qith a fix, provided it is a common fix usable for all users.
Maybe we can handle deleting those files using File.deleteOnExit() instead of immediately deleting it, nevertheless there is still to be solved at which phase to execute the operation and how often. I would call this a small design problem in IzPack.

René


Dne úterý 8. prosince 2015 15:21:40 UTC+1 Stefan Murawski napsal(a):

René Krell

unread,
Jan 27, 2016, 6:32:08 PM1/27/16
to izpack-user
Just for the record and for developers: There is an ongoing discussion regarding this problem along with this pull request: https://github.com/izpack/izpack/pull/418.

René Krell

unread,
Jan 29, 2016, 5:50:24 PM1/29/16
to izpack-user
As this is an actual error I created an issue for this: https://izpack.atlassian.net/browse/IZPACK-1321.
@Stefan, maybe you might re-register at JIRA, I see your account imported from Codehaus but some information might have got lost, see http://news.izpack.org/2015/06/relocation-of-izpack-services-after.html.

René Krell

unread,
Jan 29, 2016, 7:11:14 PM1/29/16
to izpack-user
I merged the fix provided by Andreas to the latest master branch.
Please check whether this solves the problem for you.


Dne úterý 8. prosince 2015 13:48:16 UTC+1 Stefan Murawski napsal(a):
Reply all
Reply to author
Forward
0 new messages