-
Notifications
You must be signed in to change notification settings - Fork 92
Cloning config and patches from the master branch instead of a specific branch #659
Comments
/cc @jcvenegas |
we recently started to branch packaging, it is a bug if is not able to found the patches directly. |
if packaging is downloaded in a different place (no |
When I initially cloned the repo to run
So it appears to be cloning the repo to another location that is in the GOPATH but fails to realise that it is in a different branch. |
It sounds like We need to explain this behavior in the |
@joshku so to try to summarize the the issue.
2 ) run the build kernel script
Is that right ? But works if instead you do, something like:
|
So the first and second step sound correct. What I did to get it to work is just to adjust the code at line 161 of I suspect what you are saying is correct. I am not really sure what |
I believe that regardless of what I did, within the |
Rigth, so when I did those scripts I was expecting that people do a go get, and the extra git clone is if for some reason just download the script so it could get them. But seems really confusing flow. So we can modify the script -readonly patches_repo_dir="${GOPATH}/src/${patches_repo}" # Default path to search patches to apply to kernel
-readonly default_patches_dir="${patches_repo_dir}/kernel/patches/"
+readonly default_patches_dir="${script_dir}/patches/"
# Default path to search config for kata
-readonly default_kernel_config_dir="${GOPATH}/src/${kernel_config_repo}/kernel/configs"
+readonly default_kernel_config_dir="${script_dir}/configs"
# Default path to search for kernel config fragments
-readonly default_config_frags_dir="${GOPATH}/src/${kernel_config_repo}/kernel/configs/fragments"
+readonly default_config_frags_dir="${script_dir}/configs/fragments" And instead of download again the repo, just fail. https://github.com/kata-containers/packaging/blob/master/kernel/build-kernel.sh#L238 -[ -d "${patches_path}" ] || git clone "https://${patches_repo}.git" "${patches_repo_dir}"
+[ -d "${patches_path}" ] || die "patches path ${patches_path} not found" # or a warning only. |
ahh I see. That makes a lot more sense. I like this flow because if we keep the |
Description of problem
When trying to build the kernel, I am using the branch
stable-1.7
but when runningbuild_kernel.sh
, it is cloning from the master branch and not switching tostable-1.7
which results in a missing config file.packaging/kernel/build-kernel.sh
Line 160 in fdacac9
Looking at the commit history, it appears the config file was dropped in the master branch but the changes haven't made it to the
stable-1.7
branch yet.Expected result
When cloning the repo, it should switch to the branch that is being used and not use the master branch to build
Actual result
It is building the kernel off the master branch and not the branch the user is using.
The text was updated successfully, but these errors were encountered: