Unverified Commit 0c09d02d authored by José Manuel Domínguez's avatar José Manuel Domínguez Committed by Nicola Soranzo
Browse files

Fix `test_mulled_build.py::test_mulled_build_files_cli` with `use_mamba=True`

Test `tests/tool_util/mulled/test_mulled_build.py::test_mulled_build_files_cli[True]`, where `[True]` refers to the parameter `use_mamba`, fails because if `conda install --quiet --yes 'mamba='` (the preinstall command) runs before `mamba install -p /usr/local`, then the latter expects either `/usr/local` not to exist or to be an existing environment.

To work this around, create an environment in `/usr/local/env`, but still put it on the expected location `/usr/local` later.
parent 18312cfc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -88,13 +88,14 @@ inv.task('build')
    .using(conda_image)
        .withHostConfig({binds = bind_args})
        .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 --copy --yes '
            .. ' --strict-channel-priority -p /usr/local/env --copy --yes '
            .. verbose
            .. postinstall)
    .wrap('build/dist')
    .wrap('build/dist/env')
        .at('/usr/local')
        .inImage(destination_base_image)
        .as(repo)
+2 −1
Original line number Diff line number Diff line
@@ -148,7 +148,8 @@ class CondaSearch:
            elif header_found:
                lines_fields.append(line.split())
        return [
            {"package": line_fields[0], "version": line_fields[1], "build": line_fields[2]} for line_fields in lines_fields
            {"package": line_fields[0], "version": line_fields[1], "build": line_fields[2]}
            for line_fields in lines_fields
        ]