diff mbox series

Fixes [YOCTO #15473]

Message ID SJ0PR22MB27953575EC4D45F9CFEB4D9BFA1B2@SJ0PR22MB2795.namprd22.prod.outlook.com
State New
Headers show
Series Fixes [YOCTO #15473] | expand

Commit Message

Kari Sivonen April 29, 2024, 6:41 a.m. UTC
Hi,

here is patch for my bug. Send manually as looks like git send-email says it sends but something block it and looks not send.

Looks like I need to register to openembedded also. Not enough to join bugzilla  of yocto project.

I hope now you will get the patch.

-Kari
From c52bb02702dd9b0148d76115797d609b1ef07e63 Mon Sep 17 00:00:00 2001
From: Kari Sivonen <kari.sivonen@live.com>
Date: Thu, 25 Apr 2024 17:54:22 +0300
Subject: [PATCH] Fixes [YOCTO #15473]

Add return false to supports_checksum for svn fetcher.

This fixes MIRROR usage for svn uri.

Signed-off-by: Kari Sivonen <kari.sivonen@live.com>
---
 lib/bb/fetch2/svn.py  |  3 +++
 lib/bb/tests/fetch.py | 10 +++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

-- 
2.29.0
diff mbox series

Patch

diff --git a/lib/bb/fetch2/svn.py b/lib/bb/fetch2/svn.py
index d40e4d29..0852108e 100644
--- a/lib/bb/fetch2/svn.py
+++ b/lib/bb/fetch2/svn.py
@@ -210,3 +210,6 @@  class Svn(FetchMethod):
 
     def _build_revision(self, ud, d):
         return ud.revision
+
+    def supports_checksum(self, urldata):
+        return False
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index 85c1f79f..66c93282 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -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/"