From 9e599fca179fed4329f174e8c2768ddf722f7448 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 16 Jul 2021 11:27:28 +0000 Subject: [PATCH] tools/mpp: expand basurl after dep-solving We create the urls for the packages after dep-solving. During the big refactoring (802f4010) the code that would expand the base url during that step got lost. Re-introduce that so that local repos work correctly again. Also make sure the path is absolute before calling `as_uri` since it is not guranteed that the result will be a `file:///` uri. Reported-by: Stephen Smoogen --- tools/osbuild-mpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/osbuild-mpp b/tools/osbuild-mpp index 92198ab4..2e37242f 100755 --- a/tools/osbuild-mpp +++ b/tools/osbuild-mpp @@ -248,7 +248,7 @@ class DepSolver: result = urllib.parse.urlparse(baseurl) if not result.scheme: path = basedir.joinpath(baseurl) - return path.as_uri() + return path.resolve().as_uri() except: # pylint: disable=bare-except pass @@ -337,6 +337,7 @@ class DepSolver: path = tsi.pkg.relativepath reponame = tsi.pkg.reponame baseurl = self.base.repos[reponame].baseurl[0] + baseurl = self.expand_baseurl(baseurl) # dep["path"] often starts with a "/", even though it's meant to be # relative to `baseurl`. Strip any leading slashes, but ensure there's # exactly one between `baseurl` and the path.