Yaniv Dary has uploaded a new change for review.

Change subject: packaging: setup: Removing build-conf files on failure
......................................................................

packaging: setup: Removing build-conf files on failure

If setup fails it should cleanup the partially deployed files
in order to allow a future clean setup.
If those files were already there it restores the backup
copy of the older ones, otherwise it simply removes the
new files.

Change-Id: I2507ea0c6ecd6d0a69f56d0693fcafd21f58992f
Bug-Url: https://bugzilla.redhat.com/1091700
Bug-Url: https://bugzilla.redhat.com/1084749
Signed-off-by: Yaniv Dary <[email protected]>
(cherry picked from commit 5c99c747baa3013f60bd1d2dd77cc316ccae7c2c)
---
M 
packaging/setup/plugins/ovirt-engine-common/ovirt-engine-reports/db/connection.py
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-reports refs/changes/73/27373/1

diff --git 
a/packaging/setup/plugins/ovirt-engine-common/ovirt-engine-reports/db/connection.py
 
b/packaging/setup/plugins/ovirt-engine-common/ovirt-engine-reports/db/connection.py
index 99f10d9..59c3222 100644
--- 
a/packaging/setup/plugins/ovirt-engine-common/ovirt-engine-reports/db/connection.py
+++ 
b/packaging/setup/plugins/ovirt-engine-common/ovirt-engine-reports/db/connection.py
@@ -112,13 +112,6 @@
     def _setup(self):
         p = None
         if os.path.exists(
-            oreportscons.FileLocations.OVIRT_ENGINE_REPORTS_BUILDOMATIC_DBPROP
-        ):
-            p = (
-                oreportscons.FileLocations.
-                OVIRT_ENGINE_REPORTS_BUILDOMATIC_DBPROP
-            )
-        elif os.path.exists(
             os.path.join(
                 self.environment[oreportscons.ConfigEnv.JASPER_HOME],
                 (
@@ -126,6 +119,8 @@
                     LEGACY_OVIRT_ENGINE_REPORTS_BUILDOMATIC_DBPROP
                 ),
             )
+        ) and os.path.exists(
+            self.environment[oreportscons.ConfigEnv.LEGACY_REPORTS_WAR],
         ):
             self.environment[oreportscons.CoreEnv.ENABLE] = True
             p = os.path.join(
@@ -135,6 +130,13 @@
                     LEGACY_OVIRT_ENGINE_REPORTS_BUILDOMATIC_DBPROP
                 ),
             )
+        elif os.path.exists(
+            oreportscons.FileLocations.OVIRT_ENGINE_REPORTS_BUILDOMATIC_DBPROP
+        ):
+            p = (
+                oreportscons.FileLocations.
+                OVIRT_ENGINE_REPORTS_BUILDOMATIC_DBPROP
+            )
 
         if (
             p is not None and


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2507ea0c6ecd6d0a69f56d0693fcafd21f58992f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-reports
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Yaniv Dary <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to