/* Always check out a temporary branch for xen */
tmpBranch := "xsa/tmp"
- if tr, prs := r.Recipes[TreeXen]; prs && tr.HasPatches() {
- err = xenrepo.MakeBranch(tmpBranch, branch)
- if err != nil {
- return fmt.Errorf("Checking out xen.git branch %s: %v\n",
- branch, err)
- }
- } else {
- err = xenrepo.MakeBranch(tmpBranch, XenStableBranch(r.XenVersion))
- if err != nil {
- return fmt.Errorf("Making tempbranch %s for xenversion %v: %v\n",
- tmpBranch, r.XenVersion, err)
- }
+
+ // If the recipe has Xen patches, use the recipe branch name;
+ // otherwise, use the stable branch for that Xen version
+ wtbranch := branch
+ if tr, prs := r.Recipes[TreeXen]; !(prs && tr.HasPatches()) {
+ wtbranch = XenStableBranch(r.XenVersion)
+ }
+
+ err = xenrepo.MakeBranch(tmpBranch, wtbranch)
+ if err != nil {
+ return fmt.Errorf("Making tempbranch %s from %v for xenversion %v: %v\n",
+ tmpBranch, branch, r.XenVersion, err)
}
// Make .config file with path to repos