diff --git a/atomic_reactor/constants.py b/atomic_reactor/constants.py index 095b7fb46..61c96ba6b 100644 --- a/atomic_reactor/constants.py +++ b/atomic_reactor/constants.py @@ -202,7 +202,6 @@ # Cachi2 constants CACHI2_BUILD_DIR = "_cachi2_remote_sources" CACHI2_BUILD_APP_DIR = "app" -CACHI2_BUILD_DEP_DIR = "deps" CACHI2_PKG_OPTIONS_FILE = "cachi2_pkg_options.json" CACHI2_FOR_OUTPUT_DIR_OPT_FILE = "cachi2_for_output_dir_opt.txt" CACHI2_SINGLE_REMOTE_SOURCE_NAME = "remote-source" diff --git a/atomic_reactor/plugins/cachi2_init.py b/atomic_reactor/plugins/cachi2_init.py index 678274e45..5b4ffcee6 100644 --- a/atomic_reactor/plugins/cachi2_init.py +++ b/atomic_reactor/plugins/cachi2_init.py @@ -17,7 +17,6 @@ PLUGIN_CACHI2_INIT, CACHI2_BUILD_DIR, CACHI2_BUILD_APP_DIR, - CACHI2_BUILD_DEP_DIR, CACHI2_PKG_OPTIONS_FILE, CACHI2_FOR_OUTPUT_DIR_OPT_FILE, CACHI2_SINGLE_REMOTE_SOURCE_NAME, @@ -148,9 +147,9 @@ def write_cachi2_for_output_dir(self, remote_source_name: str, path: Path): This must be path inside container so users have the right paths to use it within image build """ - value = os.path.join(REMOTE_SOURCE_DIR, CACHI2_BUILD_DEP_DIR) + value = Path(REMOTE_SOURCE_DIR) if self.multiple_remote_sources_params: - value = os.path.join(REMOTE_SOURCE_DIR, remote_source_name, CACHI2_BUILD_DEP_DIR) + value = value / remote_source_name with open(path, 'w') as f: f.write(str(value)) diff --git a/tests/plugins/test_cachi2_init.py b/tests/plugins/test_cachi2_init.py index cf827da5d..1a305d765 100644 --- a/tests/plugins/test_cachi2_init.py +++ b/tests/plugins/test_cachi2_init.py @@ -130,7 +130,7 @@ def test_single_remote_source_initialization(workflow, mocked_cachi2_init): workflow, CACHI2_SINGLE_REMOTE_SOURCE_NAME, {"packages": [{"path": ".", "type": "gomod"}], "flags": []}, - '/remote-source/deps') + '/remote-source') assert result == [{ "name": "", @@ -183,12 +183,12 @@ def test_multi_remote_source_initialization(workflow, mocked_cachi2_init): "packages": [{"path": ".", "type": "gomod"}], "flags": ["gomod-vendor"] }, - f'/remote-source/{first_remote_source_name}/deps') + f'/remote-source/{first_remote_source_name}') assert_cachi2_init_files( workflow, second_remote_source_name, {"packages": [{"path": ".", "type": "gomod"}], "flags": []}, - f'/remote-source/{second_remote_source_name}/deps') + f'/remote-source/{second_remote_source_name}') assert result == [{ "name": first_remote_source_name,