Skip to content

Commit

Permalink
Revert "Split installation shell command into four"
Browse files Browse the repository at this point in the history
This reverts commit bd24d0c.

It makes sense to revert the changes because every `run()` statement runs in its own container, thus it cannot be ruled out that other code is building the preinstall or postinstall commands under the assumption that they will run in the same container (or even in the same container as the conda commands). An example is available on #19545 (comment).
  • Loading branch information
kysrpex committed Feb 6, 2025
1 parent bd24d0c commit 7c1b644
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions lib/galaxy/tool_util/deps/mulled/invfile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,29 @@ else
end

local preinstall = VAR.PREINSTALL
if preinstall ~= '' then
preinstall = preinstall .. ' && '
end

local postinstall = VAR.POSTINSTALL
if postinstall ~= '' then
postinstall = '&&' .. postinstall
end

inv.task('build')
.using(conda_image)
.withHostConfig({binds = {"build:/data"}})
.run('rm', '-rf', '/data/dist')
.using(conda_image)
.withHostConfig({binds = bind_args})
.run('/bin/sh', '-c', preinstall)
.run('/bin/sh', '-c', conda_bin .. ' create --quiet --yes -p /usr/local/env --copy')
.run('/bin/sh', '-c', conda_bin .. ' install ' .. channel_args .. ' ' .. target_args
.. ' --strict-channel-priority -p /usr/local/env --copy --yes ' .. verbose)
.run('/bin/sh', '-c', postinstall)
.run('/bin/sh', '-c', preinstall
.. conda_bin .. ' create --quiet --yes -p /usr/local/env --copy && '
.. conda_bin .. ' install '
.. channel_args .. ' '
.. target_args
.. ' --strict-channel-priority -p /usr/local/env --copy --yes '
.. verbose
.. postinstall)
.wrap('build/dist/env')
.at('/usr/local')
.inImage(destination_base_image)
Expand Down

0 comments on commit 7c1b644

Please sign in to comment.