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

Change subject: packaging: setup: remove: do not touch file if not changed
......................................................................

packaging: setup: remove: do not touch file if not changed

Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=1058018
Change-Id: I6c2fa5c514984512bc817323e026e56c9bdb9d44
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M packaging/setup/plugins/ovirt-engine-remove/ovirt-engine/files/simple.py
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/68/24468/1

diff --git 
a/packaging/setup/plugins/ovirt-engine-remove/ovirt-engine/files/simple.py 
b/packaging/setup/plugins/ovirt-engine-remove/ovirt-engine/files/simple.py
index 6f431ac..7065327 100644
--- a/packaging/setup/plugins/ovirt-engine-remove/ovirt-engine/files/simple.py
+++ b/packaging/setup/plugins/ovirt-engine-remove/ovirt-engine/files/simple.py
@@ -91,12 +91,13 @@
                 new_content.append(line)
         new_content.extend(just_add)
 
-        self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append(
-            filetransaction.FileTransaction(
-                name=filename,
-                content=new_content
+        if new_content != old_content:
+            self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append(
+                filetransaction.FileTransaction(
+                    name=filename,
+                    content=new_content
+                )
             )
-        )
 
     def __init__(self, context):
         super(Plugin, self).__init__(context=context)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c2fa5c514984512bc817323e026e56c9bdb9d44
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