[elbe-devel] [PATCH v2 4/4] easoap install_elbe_version: return error, when in devel mode

Torben Hohn torben.hohn at linutronix.de
Fri Nov 23 12:17:24 CET 2018


in devel mode installing a different elbe version package does not
have any effect.

refuse to install anything, when in devel mode.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/daemons/soap/esoap.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
index 83afda7f..e29d18a0 100644
--- a/elbepack/daemons/soap/esoap.py
+++ b/elbepack/daemons/soap/esoap.py
@@ -17,7 +17,7 @@ import sys
 from tempfile import NamedTemporaryFile
 
 from elbepack.shellhelper import system, command_out
-from elbepack.version import elbe_version
+from elbepack.version import elbe_version, is_devel
 from elbepack.elbexml import ValidationMode
 from elbepack.filesystem import hostfs
 
@@ -69,6 +69,11 @@ class ESoap (ServiceBase):
     @soap_faults
     @authenticated_admin
     def install_elbe_version(self, version, pkglist):
+        if is_devel:
+            return SoapCmdReply(10,
+                                'Initvm is in devel mode: installing another\n'
+                                'elbe version will not have any effect.\n')
+
         pkgs = ['"%s=%s*"' % (p, version) for p in pkglist]
 
         # Prevent, that elbe daemon is restarted by the
-- 
2.11.0




More information about the elbe-devel mailing list