-
Notifications
You must be signed in to change notification settings - Fork 99
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: Add apply_patch_mbox method #2041
Conversation
Sorry, got that wrong. I see it's just applying patch files on top of a source tree. Still it's missing the initial step as far as I can tell, which is about the logic that will be receiving the data from Patchwork to get a pipeline running with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to merge this one, just added some comments about a few minor things to tweak. It's not used in the code base yet but it makes sense to have it as a utility method for the rest, and the way kernel builds are done will need to be reworked anyway for the new pipeline so this will all get consolidated again in the near future.
7f39442
to
51aedc8
Compare
Signed-off-by: Nikolay Yurin <[email protected]>
51aedc8
to
cc52244
Compare
git config user.name "{git_username}" | ||
git config user.email "{git_email}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I mean, I think we should actually remove these lines. Say, if you're doing this over your working kernel source tree and you don't specify command line arguments with your current user name and email then it will replace it. And then next time you make a commit in the kernel source tree it'll be with the [email protected]
email.
So it should be left to the user to manage this outside of kci_build
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean it should be part of KernelCI config files or something? Sorry, I am not quite following what do you mean. Git won't allow to apply patches without name
and email
being set though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be part of the user's Git config, yes. Or we could maybe have a separate command to set the user name and email explicitly if some CI systems need to do that, as a handy wrapper.
Git won't allow to apply patches without name and email being set though.
Yes and that's fine. If there's no user name and email configured then git will fail and the issue will be on the user to solve it. Just like running any other invalid command (say, if kdir
is not a Git repo etc.).
@yurinnick Please correct me if I'm wrong: this PR is a dependency to kernelci/kernelci-pipeline#295 which has been closed. Can this one be closed as well or is it still intended to be used somewhere? If it is being repurposed, could you point me where it's used (I wasn't able to locate any)? |
@pawiecz there was some back-n-forth on a best way to apply patches, I think it's safe to close for now and re-open if you'll need to get back to it. |
Fixes kernelci/kernelci-api#307
Implement
apply_patch_mbox
method that downloads patch from mbox url into a temporary file and apply in to kernel treeTest run logs: