From 8c45eb64ade699ce3d8717f460b3064ca3ab3a59 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sat, 1 Oct 2016 22:50:33 +0100 Subject: [PATCH] pass apiurl to source services (#234) Some source services need to know the apiurl, e.g. to lookup values in the ~/.oscrc config file. Closes #234. https://github.com/openSUSE/osc/issues/234 --- osc/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osc/core.py b/osc/core.py index 8291a181..bb889c04 100644 --- a/osc/core.py +++ b/osc/core.py @@ -297,6 +297,7 @@ class Serviceinfo: self.services.append(data) def getProjectGlobalServices(self, apiurl, project, package): + self.apiurl = apiurl # get all project wide services in one file, we don't store it yet u = makeurl(apiurl, ['source', project, package], query='cmd=getprojectservices') try: @@ -392,6 +393,7 @@ class Serviceinfo: # set environment when using OBS 2.3 or later if self.project != None: + os.putenv("OBS_SERVICE_APIURL", self.apiurl) os.putenv("OBS_SERVICE_PROJECT", self.project) os.putenv("OBS_SERVICE_PACKAGE", self.package)