diff options
| -rw-r--r-- | meta-oe/classes/socorro-syms.bbclass | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/meta-oe/classes/socorro-syms.bbclass b/meta-oe/classes/socorro-syms.bbclass index 0312031d0d..7a7b20859f 100644 --- a/meta-oe/classes/socorro-syms.bbclass +++ b/meta-oe/classes/socorro-syms.bbclass | |||
| @@ -148,12 +148,10 @@ def git_repository_path(source_file_path): | |||
| 148 | url_match = re.search(".*(://|@)([^:/]*).*", source_long_url) | 148 | url_match = re.search(".*(://|@)([^:/]*).*", source_long_url) |
| 149 | source_server = url_match.group(2) | 149 | source_server = url_match.group(2) |
| 150 | 150 | ||
| 151 | # (2) Get the branch for this file. If it's detached and just shows HEAD | 151 | # (2) Get the branch for this file. |
| 152 | # then set it to master and hope we can get the correct revision from there. | 152 | source_branch_list = run_command("git show-branch --list", source_file_dir) |
| 153 | source_branch = run_command( | 153 | source_branch_match = re.search(".*?\[(.*?)\].*", source_branch_list) |
| 154 | "git rev-parse --abbrev-ref HEAD", source_file_dir) | 154 | source_branch = source_branch_match.group(1) |
| 155 | if source_branch == "HEAD": | ||
| 156 | source_branch = "master" | ||
| 157 | 155 | ||
| 158 | # (3) Since the repo root directory name can be changed without affecting | 156 | # (3) Since the repo root directory name can be changed without affecting |
| 159 | # git, we need to extract the name from something more reliable. | 157 | # git, we need to extract the name from something more reliable. |
