Temporary Directory Issues Cause Installation Failure #1799
Labels
-tooling
Category: tooling
d-intermediate
Difficulty: some prior knowledge required
p-high
Should be completed in the next sprint
General Summary
I have found several issues regarding handling of the temporary directory which cause the installation to sometimes fail.
Steps to Reproduce
i. The clutter needs to be specific, for example create a directory
graalvm-ce-java11-21.1.0
and put some files of the runtime here.ii. Due to other errors described below, you can just run
enso install engine 0.2.12-SNAPSHOT.2021-06-15
followed byenso uninstall engine 0.2.12-SNAPSHOT.2021-06-15
.enso install engine 0.2.12-SNAPSHOT.2021-06-15
or open a project in IDE that will require that version.Expected Result
The engine should be correctly installed.
Actual Result
The launcher fails with:
and the Project Manager fails with:
Enso Version
This happens on Launcher/PM from the latest (2021-06-15) nightly build.
Analysis
The above bug has uncovered a few (more-or-less related) issues with how temporary directory handling during installation/uninstallation:
tmp
directory and only then the files are actually removed. The move succeeds but the deletion seems to fail on some files. It looks like it may be related to symlinks, but that has to be investigated.tmp
dir is cleared only opportunistically (and not at all by the Project Manager), so it is very possible that there is already a directory with the same name as used by a package that is currently being installed. This causes the corruption as described above.Necessary solutions:
rm
is able to remove it even without-f
so it should definitely be doable).DistributionConfiguration.makeRuntimeVersionManager
just before creating an instance ofRuntimeVersionManager
.The text was updated successfully, but these errors were encountered: