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

diff-kernel-config: handle absolute paths for output directory #2563

Conversation

markusboehme
Copy link
Member

Issue number: n/a

Description of changes: When extracting the kernel config of a just built kernel diff-kernel-config would always treat the given output directory as a relative path due to a gratuitous "./" in the path it assembles. This would try to write to the wrong path when the script was actually invoked with an absolute path, most likely making it fail because parent directories wouldn't exist.

Correctly handle absolute paths by dropping the "./". Other parts of the code dealing with the output directory already don't care whether it's an absolute or relative path.

Testing done: Successfully ran tools/diff-kernel-config both with an absolute and a relative path for the output directory.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

When extracting the kernel config of a just built kernel
diff-kernel-config would always treat the given output directory as a
relative path due to a gratuitous "./" in the path it assembles. This
would try to write to the wrong path when the script was actually
invoked with an absolute path, most likely making it fail because parent
directories wouldn't exist.

Correctly handle absolute paths by dropping the "./". Other parts of the
code dealing with the output directory already don't care whether it's
an absolute or relative path.

Signed-off-by: Markus Boehme <[email protected]>
@markusboehme markusboehme merged commit bc15cd6 into bottlerocket-os:develop Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants