File 0001-Append-a-trailing-slash-to-baseUrl.patch of Package libzypp

From 550b4d26b840378537a88db555f19ad03f9ca76f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dirk=20M=C3=BCller?= <dirk@dmllr.de>
Date: Wed, 4 Jun 2025 00:35:32 +0200
Subject: [PATCH] Append a trailing slash to baseUrl

---
 zypp/RepoInfo.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/zypp/RepoInfo.cc b/zypp/RepoInfo.cc
index 604a79c5c..9d3aef8f3 100644
--- a/zypp/RepoInfo.cc
+++ b/zypp/RepoInfo.cc
@@ -186,7 +186,9 @@ namespace zypp
            && repo::RepoMirrorList::urlSupportsMirrorLink( *_baseUrls.transformedBegin() ) ) {
 
         mlurl = *_baseUrls.transformedBegin ();
-        mlurl.appendPathName("/");
+        if (!mlurl.getPathName().empty() && mlurl.getPathName() != "/" && !zypp::str::endsWith(mlurl.getPathName(), "/") ) {
+          mlurl.setPathName(mlurl.getPathName() + "/");
+        }
         mlurl.setQueryParam("mirrorlist", std::string() );
 
         MIL << "Detected opensuse.org baseUrl with no mirrors, requesting them from : " << mlurl.asString() << std::endl;
-- 
2.49.0

openSUSE Build Service is sponsored by