Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernelci/build.py: fix git_branch_tip #2734

Merged
merged 1 commit into from
Nov 5, 2024
Merged
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
2 changes: 1 addition & 1 deletion kernelci/build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2018, 2019, 2020, 2021 Collabora Limited

Check warning on line 1 in kernelci/build.py

View workflow job for this annotation

GitHub Actions / Lint

Too many lines in module (1600/1000)

Check warning on line 1 in kernelci/build.py

View workflow job for this annotation

GitHub Actions / Lint

Missing module docstring
# Author: Guillaume Tucker <[email protected]>
#
# This module is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -41,7 +41,7 @@
/raw/master/{branch}/{config}"

CROS_CONFIG_URL = \
"https://chromium.googlesource.com/chromiumos/third_party/kernel/+archive/refs/heads/{branch}/chromeos/config.tar.gz" # noqa

Check warning on line 44 in kernelci/build.py

View workflow job for this annotation

GitHub Actions / Lint

Line too long (129/100)

# Hard-coded make targets for each CPU architecture
MAKE_TARGETS = {
Expand Down Expand Up @@ -76,7 +76,7 @@
The returned value is the git SHA of the current head of the branch
associated with the build config, or None if an error occurred.
"""
cmd = "git ls-remote {url} refs/heads/{branch}".format(

Check warning on line 79 in kernelci/build.py

View workflow job for this annotation

GitHub Actions / Lint

Formatting a regular string which could be a f-string
url=config.tree.url, branch=config.branch)
head = shell_cmd(cmd)
if not head:
Expand All @@ -100,7 +100,7 @@


def _fetch_tags(path, url=TORVALDS_GIT_URL):
shell_cmd("""

Check warning on line 103 in kernelci/build.py

View workflow job for this annotation

GitHub Actions / Lint

Formatting a regular string which could be a f-string
set -e
cd {path}
git fetch --tags {url}
Expand Down Expand Up @@ -275,7 +275,7 @@
git rev-parse {tree}/{branch}
""".format(path=path, tree=tree, branch=branch)
head_commit_id = shell_cmd(cmd)
if commit == head_commit_id:
if commit.strip() == head_commit_id.strip():
return True
return False

Expand Down Expand Up @@ -1209,7 +1209,7 @@
res = self._make(target, jopt, verbose, opts)

if res and kci_frag_name:
# ToDo: treat kernelci.config as an implementation detail and list

Check warning on line 1212 in kernelci/build.py

View workflow job for this annotation

GitHub Actions / Lint

ToDo: treat kernelci.config as an implementation detail and list
# the actual input config fragment files here instead
bmeta['kernel']['fragments'] = [kci_frag_name]
res = self._merge_config(kci_frag_name, verbose)
Expand Down
Loading