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

Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=1059480
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/79/23879/1

diff --git a/packaging/services/ovirt-engine/ovirt-engine.py 
b/packaging/services/ovirt-engine/ovirt-engine.py
index 4c02208..eb850a9 100755
--- a/packaging/services/ovirt-engine/ovirt-engine.py
+++ b/packaging/services/ovirt-engine/ovirt-engine.py
@@ -152,19 +152,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,
                     ),
                 )
@@ -175,7 +175,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/23879
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71f5b8850987372d1d785adceebf020d39a474eb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
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