mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
bitbake: fetch2/svn: Fix mirroring issue with svn
Add return false to supports_checksum for svn fetcher which fhis fixes MIRROR usage for svn uris. Also add a testcase. [YOCTO #15473] (Bitbake rev: 21cfc7ae9a19f39ac8904e1c3466e7e499ac523f) Signed-off-by: Kari Sivonen <kari.sivonen@live.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ead0ff2210
commit
9925db0c4f
|
@ -210,3 +210,6 @@ class Svn(FetchMethod):
|
|||
|
||||
def _build_revision(self, ud, d):
|
||||
return ud.revision
|
||||
|
||||
def supports_checksum(self, urldata):
|
||||
return False
|
||||
|
|
|
@ -511,7 +511,8 @@ class MirrorUriTest(FetcherTest):
|
|||
mirrorvar = "http://.*/.* file:///somepath/downloads/ " \
|
||||
"git://someserver.org/bitbake git://git.openembedded.org/bitbake " \
|
||||
"https://.*/.* file:///someotherpath/downloads/ " \
|
||||
"http://.*/.* file:///someotherpath/downloads/"
|
||||
"http://.*/.* file:///someotherpath/downloads/ " \
|
||||
"svn://svn.server1.com/ svn://svn.server2.com/"
|
||||
|
||||
def test_urireplace(self):
|
||||
self.d.setVar("FILESPATH", ".")
|
||||
|
@ -535,6 +536,13 @@ class MirrorUriTest(FetcherTest):
|
|||
uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d)
|
||||
self.assertEqual(uris, ['file:///someotherpath/downloads/bitbake-1.0.tar.gz'])
|
||||
|
||||
def test_urilistsvn(self):
|
||||
# Catch svn:// -> svn:// bug
|
||||
fetcher = bb.fetch.FetchData("svn://svn.server1.com/isource/svnroot/reponame/tags/tagname;module=path_in_tagnamefolder;protocol=https;rev=2", self.d)
|
||||
mirrors = bb.fetch2.mirror_from_string(self.mirrorvar)
|
||||
uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d)
|
||||
self.assertEqual(uris, ['svn://svn.server2.com/isource/svnroot/reponame/tags/tagname;module=path_in_tagnamefolder;protocol=https;rev=2'])
|
||||
|
||||
def test_mirror_of_mirror(self):
|
||||
# Test if mirror of a mirror works
|
||||
mirrorvar = self.mirrorvar + " http://.*/.* http://otherdownloads.yoctoproject.org/downloads/"
|
||||
|
|
Loading…
Reference in New Issue
Block a user