diff options
Diffstat (limited to 'bitbake/lib/bb/fetch')
-rw-r--r-- | bitbake/lib/bb/fetch/git.py | 5 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch/wget.py | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index 21259a23b0..9cc7f4e086 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py | |||
@@ -50,6 +50,8 @@ class Git(Fetch): | |||
50 | if 'protocol' in ud.parm: | 50 | if 'protocol' in ud.parm: |
51 | ud.proto = ud.parm['protocol'] | 51 | ud.proto = ud.parm['protocol'] |
52 | 52 | ||
53 | ud.branch = ud.parm.get("branch", "") | ||
54 | |||
53 | tag = Fetch.srcrev_internal_helper(ud, d) | 55 | tag = Fetch.srcrev_internal_helper(ud, d) |
54 | if tag is True: | 56 | if tag is True: |
55 | ud.tag = self.latest_revision(url, ud, d) | 57 | ud.tag = self.latest_revision(url, ud, d) |
@@ -130,7 +132,8 @@ class Git(Fetch): | |||
130 | 132 | ||
131 | def _latest_revision(self, url, ud, d): | 133 | def _latest_revision(self, url, ud, d): |
132 | 134 | ||
133 | output = runfetchcmd("git ls-remote %s://%s%s" % (ud.proto, ud.host, ud.path), d, True) | 135 | bb.msg.note(1, bb.msg.domain.Fetcher, "Calling git ls-remote %s://%s%s %s" % (ud.proto, ud.host, ud.path, ud.branch ) ) |
136 | output = runfetchcmd("git ls-remote %s://%s%s %s" % (ud.proto, ud.host, ud.path, ud.branch), d, True) | ||
134 | return output.split()[0] | 137 | return output.split()[0] |
135 | 138 | ||
136 | def _build_revision(self, url, ud, d): | 139 | def _build_revision(self, url, ud, d): |
diff --git a/bitbake/lib/bb/fetch/wget.py b/bitbake/lib/bb/fetch/wget.py index 2d590ad0b2..f8ade45da7 100644 --- a/bitbake/lib/bb/fetch/wget.py +++ b/bitbake/lib/bb/fetch/wget.py | |||
@@ -66,10 +66,10 @@ class Wget(Fetch): | |||
66 | if ret != 0: | 66 | if ret != 0: |
67 | return False | 67 | return False |
68 | 68 | ||
69 | # check if sourceforge did send us to the mirror page | 69 | # Sanity check since wget can pretend it succeed when it didn't |
70 | # Also, this used to happen if sourceforge sent us to the mirror page | ||
70 | if not os.path.exists(ud.localpath): | 71 | if not os.path.exists(ud.localpath): |
71 | os.system("rm %s*" % ud.localpath) # FIXME shell quote it | 72 | bb.msg.debug(2, bb.msg.domain.Fetcher, "The fetch command for %s returned success but %s doesn't exist?..." % (uri, ud.localpath)) |
72 | bb.msg.debug(2, bb.msg.domain.Fetcher, "sourceforge.net send us to the mirror on %s" % ud.basename) | ||
73 | return False | 73 | return False |
74 | 74 | ||
75 | return True | 75 | return True |