Alon Bar-Lev has uploaded a new change for review.

Change subject: packaging: services: ovirt-engine: support absolute path at 
ENGINE_APPS
......................................................................

packaging: services: ovirt-engine: support absolute path at ENGINE_APPS

this enables to deploy wars of other packages without touching /usr

Change-Id: I71f5b8850987372d1d785adceebf020d39a474eb
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M packaging/services/ovirt-engine/ovirt-engine.py
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/77/23277/1

diff --git a/packaging/services/ovirt-engine/ovirt-engine.py 
b/packaging/services/ovirt-engine/ovirt-engine.py
index a0fecea..c7b0f0f 100755
--- a/packaging/services/ovirt-engine/ovirt-engine.py
+++ b/packaging/services/ovirt-engine/ovirt-engine.py
@@ -170,19 +170,19 @@
     def _setupEngineApps(self):
 
         # The list of applications to be deployed:
-        for engineApp in self._config.get('ENGINE_APPS').split():
-            # Do nothing if the application is not available:
-            engineAppDir = os.path.join(
-                self._config.get('ENGINE_USR'),
-                engineApp,
-            )
+        for engineAppDir in self._config.get('ENGINE_APPS').split():
+            self.logger.debug('Deploying: %s', engineAppDir)
+            if not os.path.isabs(engineAppDir):
+                engineAppDir = os.path.join(
+                    self._config.get('ENGINE_USR'),
+                    engineAppDir,
+                )
             if not os.path.exists(engineAppDir):
                 self.logger.warning(
                     _(
-                        "Application '{application}' directory '{directory}' "
+                        "Application directory '{directory}' "
                         "does not exist, it will be ignored"
                     ).format(
-                        application=engineApp,
                         directory=engineAppDir,
                     ),
                 )
@@ -193,7 +193,7 @@
             engineAppLink = os.path.join(
                 self._config.get('ENGINE_VAR'),
                 'deployments',
-                engineApp,
+                os.path.basename(engineAppDir),
             )
             if not os.path.islink(engineAppLink):
                 try:


-- 
To view, visit http://gerrit.ovirt.org/23277
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71f5b8850987372d1d785adceebf020d39a474eb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to