details:   https://code.openbravo.com/erp/devel/pi/rev/b87d6a90f2db
changeset: 16688:b87d6a90f2db
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue May 29 12:30:40 2012 +0200
summary:   Fixed issue 20630. Maintenance flag will only be set if 
update.database finished correctly.

diffstat:

 build.xml |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 5e3ad075603e -r b87d6a90f2db build.xml
--- a/build.xml Tue May 29 12:00:37 2012 +0200
+++ b/build.xml Tue May 29 12:30:40 2012 +0200
@@ -325,6 +325,19 @@
      </sequential>
   </macrodef>
   
+  <macrodef name="updatesystemstatuswhennot">
+    <attribute name="v" default="NOT SET"/>
+    <attribute name="previous" default="NOT SET"/>
+     <sequential>
+       <sql driver="${bbdd.driver}" url="${bbdd.owner.url}" 
userid="${bbdd.user}" password="${bbdd.password}" onerror="continue" 
autocommit="true">
+         <classpath> <fileset dir="${base.lib}"> <include name="**/*.jar"> 
</include> </fileset> </classpath>
+         <transaction> UPDATE ad_system_info SET system_status='@{v}' where 
system_status!='@{previous}' ;
+                       DELETE FROM ad_error_log where system_status=(select 
system_status from ad_system_info)
+         </transaction>
+       </sql>
+     </sequential>
+  </macrodef>
+  
   <taskdef resource="axis-tasks.properties" classpathref="project.class.path" 
/>
   
   <target name="init" depends="code.rev">
@@ -383,7 +396,7 @@
 
     <ant dir="${base.db}" target="setApplied" inheritAll="true" 
inheritRefs="true" />
     <antcall target="build.deploy" />
-    <updatesystemstatus v="RB51"/>
+    <updatesystemstatuswhennot v="RB51" previous="RB12"/>
     <!-- only restart tomcat if the restart prop was set to true -->
     <condition property="dorestart">
       <istrue value="${restart}" />

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to