diff --git a/kt/commands/checkout/command.py b/kt/commands/checkout/command.py index b1fc656..72f7bbb 100644 --- a/kt/commands/checkout/command.py +++ b/kt/commands/checkout/command.py @@ -34,7 +34,8 @@ $ kt checkout lts-9.2 --cleanup --change-dir \b $ kt checkout lts-9.2 -e CVE-2022-49909 -Will create folder lts-9.2_CVE-2022-49909 instead of lts-9.2. +Will create folder lts-9.2_CVE-2022-49909 instead of lts-9.2, +and branch {}_CVE-2022-49909_. \b $ kt checkout cbr-7.9 --no-worktree Will not create worktrees for CentOS7 bridge. diff --git a/kt/commands/content_release/impl.py b/kt/commands/content_release/impl.py index 4ec8e02..9f3c111 100644 --- a/kt/commands/content_release/impl.py +++ b/kt/commands/content_release/impl.py @@ -1,6 +1,7 @@ import logging import os import re +import sys from git import GitCommandError, Repo @@ -102,6 +103,7 @@ def prepare(cls, kernel_workspace: str): staging_branch = f"{{automation_tmp}}_{src_branch_name}" cmd = [ + sys.executable, str(mkdistgitdiff_script), "--srcgit", str(kernel_workspace_obj.src_worktree.folder.absolute()), diff --git a/kt/data/kernels.yaml b/kt/data/kernels.yaml index 5ed0dc3..49a71a4 100644 --- a/kt/data/kernels.yaml +++ b/kt/data/kernels.yaml @@ -1,8 +1,8 @@ common_repos: dist-git-tree-fips: git@gitlab.com:ctrl-iq-public/fips/src/kernel.git dist-git-tree: git@github.com:ciq-rocky-lts/kernel.git - kernel-src-tree: https://github.com/ctrliq/kernel-src-tree.git - kernel-src-tree-tools: https://github.com/ctrliq/kernel-src-tree-tools.git + kernel-src-tree: git@github.com:ctrliq/kernel-src-tree.git + kernel-src-tree-tools: git@github.com:ctrliq/kernel-src-tree-tools.git kernels: cbr-7.9: diff --git a/kt/ktlib/kernel_workspace.py b/kt/ktlib/kernel_workspace.py index ed6fd75..b863b8b 100644 --- a/kt/ktlib/kernel_workspace.py +++ b/kt/ktlib/kernel_workspace.py @@ -233,9 +233,13 @@ def load(cls, name: str, config: Config, kernel_info: KernelInfo, use_worktree: default_remote = "origin" dist_folder = folder / Path(Constants.DIST_TREE) - dist_local_branch = f"{{{user}}}_{kernel_info.dist_git_branch}" + # Keep the remote branch last: GHA matches branches on *_ if extra: - dist_local_branch += f"_{extra}" + branch_prefix = f"{{{user}}}_{extra}_" + else: + branch_prefix = f"{{{user}}}_" + + dist_local_branch = f"{branch_prefix}{kernel_info.dist_git_branch}" dist_worktree = RepoWorktree( source_root=Repo(kernel_info.dist_git_root.folder), @@ -247,9 +251,7 @@ def load(cls, name: str, config: Config, kernel_info: KernelInfo, use_worktree: ) src_folder = folder / Path(Constants.SRC_TREE) - src_local_branch = f"{{{user}}}_{kernel_info.src_tree_branch}" - if extra: - src_local_branch += f"_{extra}" + src_local_branch = f"{branch_prefix}{kernel_info.src_tree_branch}" src_worktree = RepoWorktree( source_root=Repo(kernel_info.src_tree_root.folder),