Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kt/commands/checkout/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {<user>}_CVE-2022-49909_<branch>.
\b
$ kt checkout cbr-7.9 --no-worktree
Will not create worktrees for CentOS7 bridge.
Expand Down
2 changes: 2 additions & 0 deletions kt/commands/content_release/impl.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import os
import re
import sys

from git import GitCommandError, Repo

Expand Down Expand Up @@ -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()),
Expand Down
4 changes: 2 additions & 2 deletions kt/data/kernels.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
12 changes: 7 additions & 5 deletions kt/ktlib/kernel_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *_<remote branch>
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),
Expand All @@ -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),
Expand Down
Loading