From 7fb76a9f7870cb7d191b579820ee17b7ebee406b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0oltis?= Date: Wed, 18 Dec 2024 13:58:29 +0100 Subject: [PATCH] bundler: Fix name for git repos in config file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The name of the cached git repository comes from git URL, not from the name declared in the Gemfile. We use `repo_name` property for that in the `GitDependency` class [1]. Reuse the property for the cache path in the bundler config file as well. --- [1]: https://github.com/containerbuildsystem/cachi2/blob/main/cachi2/core/package_managers/bundler/parser.py#L143 Signed-off-by: Michal Ĺ oltis --- cachi2/core/package_managers/bundler/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cachi2/core/package_managers/bundler/main.py b/cachi2/core/package_managers/bundler/main.py index b213baeb1..cc49e5173 100644 --- a/cachi2/core/package_managers/bundler/main.py +++ b/cachi2/core/package_managers/bundler/main.py @@ -90,7 +90,7 @@ def _resolve_bundler_package( else: properties = [] if isinstance(dep, GitDependency): - git_paths.append((dep.name, dep.name + "-" + dep.ref[:12])) + git_paths.append((dep.name, dep.repo_name + "-" + dep.ref[:12])) c = Component(name=dep.name, version=dep.version, purl=dep.purl, properties=properties) components.append(c)