diff --git a/osc/commandline.py b/osc/commandline.py index 4395fbf8..68d4db5e 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -6938,18 +6938,20 @@ Please submit there instead, or use --nodevelproject to force direct submission. osc service COMMAND (inside working copy) osc service run [SOURCE_SERVICE] osc service runall - osc service localrun - osc service disabledrun + osc service manualrun [SOURCE_SERVICE] + osc service localrun [SOURCE_SERVICE] + osc service disabledrun [SOURCE_SERVICE] osc service remoterun [PROJECT PACKAGE] osc service merge [PROJECT PACKAGE] osc service wait [PROJECT PACKAGE] COMMAND can be: - run r run defined services locally, it takes an optional parameter to run only a + run r run defined services with modes "trylocal", "localonly", or no mode set locally, may take an optional parameter to run only a specified source service. In case parameters exist for this one in _service file they are used. runall ra run all services independent of the used mode - manualrun mr run all services with mode "manual" + manualrun mr run all services with mode "manual", may take an optional parameter to run only a + specified source service remoterun rr trigger a re-run on the server side merge commits all server side generated files and drops the _service definition wait waits until the service finishes and returns with an error if it failed diff --git a/osc/core.py b/osc/core.py index 469c04e8..6613eed0 100644 --- a/osc/core.py +++ b/osc/core.py @@ -422,10 +422,13 @@ class Serviceinfo: os.unlink(ent) allservices = self.services or [] - if singleservice and not singleservice in allservices: + service_names = [s['name'] for s in allservices] + if singleservice and singleservice not in service_names: # set array to the manual specified singleservice, if it is not part of _service file - data = { 'name' : singleservice, 'command' : [ singleservice ], 'mode' : '' } + data = { 'name' : singleservice, 'command' : [ singleservice ], 'mode' : callmode } allservices = [data] + elif singleservice: + allservices = [s for s in allservices if s['name'] == singleservice] if not allservices: # short-circuit to avoid a potential http request in vc_export_env @@ -449,8 +452,6 @@ class Serviceinfo: ret = 0 for service in allservices: if callmode != "all": - if singleservice and service['name'] != singleservice: - continue if service['mode'] == "buildtime": continue if service['mode'] == "serveronly" and callmode != "local":