diff options
Diffstat (limited to 'scripts/lib/bsp/kernel.py')
| -rw-r--r-- | scripts/lib/bsp/kernel.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/lib/bsp/kernel.py b/scripts/lib/bsp/kernel.py index 7c6da4e2eb..d4bdc4c250 100644 --- a/scripts/lib/bsp/kernel.py +++ b/scripts/lib/bsp/kernel.py | |||
| @@ -713,6 +713,17 @@ def all_branches(context): | |||
| 713 | 713 | ||
| 714 | branches = [] | 714 | branches = [] |
| 715 | 715 | ||
| 716 | base_prefixes = None | ||
| 717 | |||
| 718 | try: | ||
| 719 | branches_base = context["branches_base"] | ||
| 720 | if branches_base: | ||
| 721 | base_prefixes = branches_base.split(":") | ||
| 722 | except KeyError: | ||
| 723 | pass | ||
| 724 | |||
| 725 | arch = context["arch"] | ||
| 726 | |||
| 716 | if tmp: | 727 | if tmp: |
| 717 | tmpline = tmp.split("\n") | 728 | tmpline = tmp.split("\n") |
| 718 | for line in tmpline: | 729 | for line in tmpline: |
| @@ -720,6 +731,14 @@ def all_branches(context): | |||
| 720 | break; | 731 | break; |
| 721 | idx = line.find("refs/heads/") | 732 | idx = line.find("refs/heads/") |
| 722 | kbranch = line[idx + len("refs/heads/"):] | 733 | kbranch = line[idx + len("refs/heads/"):] |
| 734 | kbranch_prefix = kbranch.rsplit("/", 1)[0] | ||
| 735 | |||
| 736 | if base_prefixes: | ||
| 737 | for base_prefix in base_prefixes: | ||
| 738 | if kbranch_prefix == base_prefix: | ||
| 739 | branches.append(kbranch) | ||
| 740 | continue | ||
| 741 | |||
| 723 | if (kbranch.find("/") != -1 and | 742 | if (kbranch.find("/") != -1 and |
| 724 | (kbranch.find("standard") != -1 or kbranch.find("base") != -1) or | 743 | (kbranch.find("standard") != -1 or kbranch.find("base") != -1) or |
| 725 | kbranch == "base"): | 744 | kbranch == "base"): |
